Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Filter the Chrome console messages

Is there a way to black filter the messages in the Chrome console?
By example, I don't want to see messages from/containing the JQMIGRATE...

like image 559
serge Avatar asked May 23 '17 08:05

serge


People also ask

How do I customize my Google Chrome console?

Goto chrome://flags/#enable-devtools-experiments , and enable Developer Tools experiments . Select Relaunch Now at the bottom of the page. F12 to Open developer tools, go to Settings , select Experiments tab, and check Allow custom UI themes . F12 , Reload DevTools.

How do I clear my console messages?

This method clears the console and displays console was cleared message. 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. On MacOS you can use Command + K button.


Video Answer


1 Answers

You can negate filters by prepending with -. For example, -JQMIGRATE will exclude messages containing the string "JQMIGRATE".

Regex filters can also be negated this way. e.g. -/^DevTools/ will exclude messages that begin with "DevTools".

(Credit goes to Donald Duck, who suggested this in a comment on the chosen answer. I thought it was a far cleaner solution than negative lookaheads, and deserved to be elevated to a top-level answer.)

like image 119
Coquelicot Avatar answered Sep 30 '22 19:09

Coquelicot