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
Error. Display the severity levels in the API documentation. For example,
console.log() is an
Info-level message, but
console.error() is an
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.
Since no filter is applied, the following figure displays dozens of messages. Next, reduce and manage the number of messages.
Choose to hide all the Warning-level messages to cut down on the noise. Navigate to the Log Levels dropdown and uncheck the
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.
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.
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.
When the Sidebar is open, you may display the overall number of messages and where each originated. The options are
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.
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.
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
I(Windows, Linux) or
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.