Filter Console messages

When you surf the web, you may find the Console is flooded with all kinds of information. Often the information isn't relevant to you. Such as information about the live project that another developer logged while you debug. Or more information about violations and warnings about the performance of the current site that you aren't able to change. It makes sense to use the filter options of Console to reduce the noise.

Filter by log level

Each method of the console object has a severity level attached to it. The severity levels are Verbose, Info, Warning, or Error. Display the severity levels in the API documentation. For example, console.log() is an Info-level message, but console.error() is an Error-level message.

To filter messages in the Console, use the Log Level dropdown menu. You may toggle the state of each level. To turn off each level, remove the checkmark next to each.

The dropdown menu filters Console messages using the log level

Since no filter is applied, the following figure displays dozens of messages. Next, reduce and manage the number of messages.

No filter set means you may display many console messages

Choose to hide all the Warning-level messages to cut down on the noise. Navigate to the Log Levels dropdown and uncheck the Warnings level.

Hide all the warning level messages in the Console to filter much of the noise

Filter by text

If you want to review more detail, to filter messages using text, type a string into the Filter textbox. For example, type block into the box to only display your messages about the browser blocking resources from loading.

Displays the messages that contain the word block

Filter by regular expression

Regular expressions are a powerful way to filter messages. For example, type /^Tracking/ into the Filter textbox to only displays messages that start with the term Tracking. If you're unfamiliar with regular expressions, RegExr is a great resource to learn about using regular expressions.

Displays the messages that start with the word filter using a regular expression in the Filter textbox

Filter by message source

You may also define what kind of messages you want to display and where each originated using the Sidebar of the Console. To do it, choose the Show console sidebar button.

To open the Sidebar, choose the Sidebar icon

When the Sidebar is open, you may display the overall number of messages and where each originated. The options are All messages, User Messages, Errors, Warnings, Info, and Verbose.

The Console Sidebar displays the different sources messages originated from

Choose any of the options to display only the messages of that type. For example, to display user messages, choose the user messages option to display less noise.

Choose to display only user messages in the Console using the filter in the Sidebar

To filter more and expand the choice, choose the triangle icon next to it. That way you get more choices to display only messages that originate from a specific source.

Choose the arrow icon expands each of the sections

Choose any of the new options to filter using type and source

Getting in touch with the Microsoft Edge DevTools team

Use the following options to discuss the new features and changes in the post, or anything else related to DevTools.

  • Send your feedback using the Send Feedback icon or select Alt+Shift+I (Windows, Linux) or Option+Shift+I (macOS) in DevTools.
  • Tweet at @EdgeDevTools.
  • Submit a suggestion to The Web We Want.
  • To file bugs about this article, use the following Feedback section.

The Send Feedback icon in the Microsoft Edge DevTools