Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hiding violations in Chrome Dev Console

Starting a few versions ago, Google Chrome has started showing JS violations in the developer console. While that can be useful sometimes, more often it is just cluttering the console.

Violations in dev console

Is there a way to disable these violations?

As a side note, also since recently, the developer console no longer features checkboxes for the various types of debug output. Now you only have log levels: Verbose, Info, Warnings, Errors. I find the former method with checkboxes much more useful - is there some way (a flag?) to make them come back?

like image 787
marlar Avatar asked May 17 '17 11:05

marlar


People also ask

How do I turn off warnings in console?

As of Chrome version 78 (Dec 2019), in the "Console" tab, click on the "Default levels" pulldown, and uncheck the types of messages you don't want displayed.

How do I clear inspect console in Chrome?

Use the short cut Ctrl + L to clear the console. Use the clear log button on the top left corner of the chrome dev tools console to clear the console.


1 Answers

In latest Chrome (64.0.3282.167), add the following to your "Filter" box with "All levels" selected:

-[Violation] 

Not sure if any sort of Regex is supported any longer (previous versions of Chrome had a checkbox that allowed you to filter by expression), but the - seems to be a "don't match".

like image 110
typeoneerror Avatar answered Oct 08 '22 11:10

typeoneerror