The most popular use case for the Console is logging information from your scripts using the console.log() method or other similar methods. Log information to display in the Console For more information, see Filter Console messages.ĭevTools with a Console full of messages: However, there's still a lot of information in the Console, which is why it's a good idea to know about the automated log and filter options in the Console. Issues are gradually being moved from the Console to the Issues tool. To view the important information that needs action, use the Issues tool in DevTools. The amount of information becomes a problem when you need to identify important information. When you open DevTools on a webpage, there may be an overwhelming amount of information in the Console. Inspect and filter information on the current webpage When you click the Search for this message on the Web button, a new tab opens in the browser and shows search results for the error message: In the Console, many error messages have a Search for this message on the Web button, shown as a magnifying glass: Search the web for your Console error messages, right from within DevTools. Search the web for a Console error message string For more information, see Fixing JavaScript errors that are reported in the Console.ĭevTools gives detailed information about the error in the Console: Click the Issues counter to open the Issues tool and display the problem. If any errors occur, the Issues counter is displayed next to the Settings icon in DevTools that provides the number of errors and warnings. The Console is the default place where JavaScript and connectivity errors are reported. The fastest way to directly open the Console is to press Ctrl+Shift+J (Windows, Linux) or Command+Option+J (macOS). The Console is shown here in the lower part of DevTools (the Drawer), with the Elements tool open above it: You can open the Console tool in the top or bottom of DevTools it's shown here in upper part, on the main toolbar: See Interact with the DOM using the Console. Interact with the web project in the browser using JavaScript.Try JavaScript expressions live in a REPL environment.Log information in scripts for debugging purposes.Get information about the web project in the browser as log messages.See Fix JavaScript errors that are reported in the Console. Track down problems to find out why something isn't working in the current project.The Console tool helps with several tasks, which are covered in more detail in the following articles: The Console provides a powerful way to script functionality, inspect the current webpage, and manipulate the current webpage using JavaScript. The Console is like an intelligent, rich command line within DevTools, and is great companion tool to use with others tools.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |