Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Possible to save a filter in the Chrome console?

I have an adblocker installed, which means that whenever I open up Chrome's console I'm greeted by dozens of net::ERR_BLOCKED_BY_CLIENT entries.

I can filter them out with something like ^((?!net::ERR_BLOCKED_BY_CLIENT).)+$, but filters are not persisted, so I have to do this constantly.

Is there a more permanent solution available, such as saving console filters or maybe a config/preference that can be edited?

like image 373
O-kasso Avatar asked Nov 22 '16 19:11

O-kasso


People also ask

How do I save my chrome Console changes?

To make things simpler, Chrome only shows you the local resources (so you don't get confused on as to whether you are editing the local or the network resource). To save your changes, press CTRL + S when editing the file.

How do you filter Console logs?

Filter by log level 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.

How do I make a pretty print Console in Chrome?

If it's the Sources panel, you can manually enable or disable pretty-printing by clicking Format. In general, if you see that icon anywhere, clicking it will enable or disable pretty-printing. Save this answer.


1 Answers

You can filter them by checking "Hide network messages". You will be able to see responses in the Network tab still. I'm not aware of any built in features to save specifc filters unfortunately.

Hide network messages

In many cases, you can hide/modify logs and errors by re-defining the Console API functions using Snippets. However, in this case, the error is not logged from the page itself, so it won't help.

like image 55
Gideon Pyzer Avatar answered Sep 20 '22 03:09

Gideon Pyzer