Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to filter output in Google Chrome's console?

I'm getting a lot of noise from the output of the 3rd party's page i'm currently playing with and i wonder if there's a way to filter the output on the console. Something like Logcat's flags. Is there a way to do that?

EDIT

I found a way to disable the output that was causing the biggest ammount of noise. I clicked with the right-clicked on the console and then disabled the XMLHttpRequest Logging option. It's not what i wanted, but it's what i needed.

like image 785
Jorge Guberte Avatar asked Jul 12 '11 03:07

Jorge Guberte


People also ask

How do I show hidden console errors?

In Chrome, navigate to Tools > Advanced > Error Console. The error console will open. Select JavaScript and Errors from the two drop downs. To find the error location, expand one of the errors.


2 Answers

You can use regular expressions.

For example to exclude the word browser-sync I use ^((?!browser-sync).)*$.

enter image description here

See also here


Chrome 44.0.2403.125

like image 50
mindrones Avatar answered Sep 18 '22 19:09

mindrones


Going further than the above answer comments..

Go in console mode ( Control Shift J on Windows ) , enter this :

console.nativeLog = console.log; 

Then enter this

console.log = function( a, b ){ if(a=="extension") console.nativeLog( b ) } 

The first line keeps the native implementation in a safe spot. The second line does pretty much what you request.

Works for me.

like image 38
tomdemuyt Avatar answered Sep 22 '22 19:09

tomdemuyt