Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I filter out errors from the Firefox Browser Console?

I'm using Greasemonkey, which sends errors to the Browser Console. I'm accessing this console by typing Ctrl+Shift+J.

The MDN docs contain links to https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Filtering_and_searching , but the link lands on a generic page. I am trying to filter out never-ending errors that look like:

10:26:36.122 Error: Permission denied to access property "postMessage"
g.L() www-widgetapi.js:94
g.P() www-widgetapi.js:91
1 www-widgetapi.js:94:312

I tried typing "-widget", "~widget", and "-permission" in the "filter output" toolbar, but they all screen out everything, such as errors of the form "missing { before try block". How can I make a filter that excludes, instead of includes?

like image 777
Noumenon Avatar asked Feb 10 '16 16:02

Noumenon


People also ask

How do I use Firefox developer tools?

You can open the Firefox Developer Tools from the menu by selecting Tools > Web Developer > Web Developer Tools or use the keyboard shortcut Ctrl + Shift + I or F12 on Windows and Linux, or Cmd + Opt + I on macOS.


1 Answers

Nowadays you can also filter out errors in the Firefox console using the filter box (above the console), and even use regular expressions. A quick way to filter out things (Firefox 73+) is to put a minus '-' in front of the text you want to filter out e.g. '-jquery'. Note that in the original question there is also a minus in 'www-widgetapi' but this is apparently not a problem (tested).

like image 108
pepgma Avatar answered Sep 21 '22 11:09

pepgma