Open In App

Console Tool in Microsoft Edge Browser

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 with other DevTools as by default it is present in the drawer of the DevTools.

Overview of Console Tool

The console tools is present in the DevTools of Edge and basically used to view logs produced by the JS of the web page. This logs can be errors, warnings, users 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 which 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.



Features of Console Tool

The various features of the Console Tool are:

Benefits of Console Tool

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:



When to use Console Tool?

The console tool is basically used to view the different logs of the website JS. The various reasons for using the Console Tool are:

Locating the Console Tool in Edge

The Console Tool in by default present in the Developers tools and you can use the tool in main toolbar or you can also use the tool in the drawer toolbar in DevTools.

Opening Console tab in both main toolbar and drawer toolbar using shortcut keys

UI of the Console Tool

The tool provides various option related to the logs that are being displayed, lets move left to right and understand these options.

Various options in the Console tab

Console sidebar

You can view the logs as categories of there types using the console sidebar which can be shown or be 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

Clear console

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

JavaScript context

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

Create live expression

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.

Adding Live Expression

Filter

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 ( / ).

Searching in the logs

Log level

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.

Filtering different log level

Displaying Number of Issues

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.

Opening Issues tab

Console Settings

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.

Changing Console Settings

Using the Console Tool

Follow the steps below to view various types of logs of the GFG website.

Step 1: Using Edge browser visit GFG web page and then press the shortcut key “Ctrl+Shift+J”.

Step 2: You will find that the DevTools get opened with the console tab. In the tab there are various logs type which are errors, warnings etc. You can filter the logs on the basis of the type that you want to work on.

Step 3: Use this information to debug the web page or use JS to check for various DOM elements of the web page.

Example of Console Tool

Conclusion

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.


Article Tags :