![]() |
VOOZH | about |
The Console tool is used to check JS errors and warnings but it can also be used to manipulate the JS of the webpage. The tool can also be used alongside other DevTools as by default it is present in the drawer of the DevTools.
The console tools are present in the DevTools of Edge and basically used to view logs produced by the JS of the web page. These logs can be errors, warnings, user messages, etc. The tool also provides JS support which you can use to monitor or manipulate the site or you can just run any JS code that may not be related to the JS. Every console.log() used by the Developers is displayed in the console and this can be used by the developers to debug the site by checking various values related to the site.
The Console Tool is by default present in the Developers tools and you can use the tool in the main toolbar or you can also use the tool in the drawer toolbar in DevTools.
Opening the Console tab in both main toolbar and drawer toolbar using shortcut keys
The tool provides various options related to the logs that are being displayed, lets move left to right and understand these options.
You can view the logs as categories of their types using the console sidebar which can be shown or hidden using the sidebar button. This sidebar helps to quickly look at only the specific types of logs such as errors or warnings. The categories can also be expanded to select the file and view only the logs of that file.
Enabling Sidebar
You can clear the console completely using this option. This helps to clean console so that you may work on typing the JS code. You can also use the shortcut key "Ctrl+L" to clear the console.
Clearing the Console
You are provide with a drop-down list of various frames used in the browser which when selected allows the JS code to work on that selected frame. This is done to because the JS code that you type in the console tab will work on only the selected frame.
Changing JS context
You may check a JS expression regularly and may have to type the expression whenever you want to check and also the console can get very untidy, to solve this problem you can add the expression as live expression. Live expression are pinned expression whose values regularly gets updated and you don't have to type the expression multiple times. Select the eye option and type the expression in the text input that appears and then press enter to add the live expression.
You can filter the logs by typing the characters or using regular expression. This helps you to search specific characters in the logs for quick and easy viewing. The regular expression must be between two slashes ( / ).
You can filter the logs using the drop-down list with respect to there types such as errors, warnings and info. If sidebar is displayed then this drop-down list is greyed out and can't be used.
The no. of issues in the site is displayed in the top of the console which indicates possible improvements that can be done to the webpage. On click it the issues tab gets opened in the drawer of the DevTools.
The settings provide various options that can be enabled or disable in the console tool such as Group similar message, Autocomplete from history, hide network messages etc.
Follow the steps below to view various types of logs of the GFG website.
The various features of the Console Tool are:
The tool allows you to check for various logs of the webpage and also allows you to manipulate the webpage. Some of the benefits of the tool are:
The console tool is basically used to view the different logs of the website JS. The various reasons for using the Console Tool are:
During development of the webpage you may get many errors, warnings or use console log for viewing or debugging purposes. All of this information and messages are displayed in the console tab. The tab comes with JS support that lets you type any JS code that can be used to manipulate the webpage. You can use this tab in the drawer while using other DevTools to save time.