Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GreaseMonkey - Firefox Web console not showing all javascript errors

The Firefox Web console (Ctrl + Shift + K) is not showing all Javascript errors that are reported in the Firefox Error Console. How to change this?

It's annoying because the Firefox Error Console has been deprecated and needs to be re-enabled explicitely in Firefox configuration.

Example of errors not showing in the Web console is accessing a property of an undefined object. This kind of exception just kills the Javascript running script and is very annoying to debug if it doesn't appear in the log...

var obj = undefined;
obj['whatever'];

This will raise an error in the Error Console but not the Web console:

/*
Exception: obj is undefined
@Scratchpad/1:11
*/

Note that "JS > Errors" is checked in the Web Console and Chrome debugging is ON on the Web console configuration.

EDIT: This seems to only apply to GreaseMonkey userscripts (and scratchpad also).

like image 605
KrisWebDev Avatar asked Nov 24 '13 11:11

KrisWebDev


1 Answers

Answer given by Brock Adams in comment:

To see Greasemonkey errors, open the browser console (Ctrl - Shift - J). [...] The web console is tab-specific -- which excludes much add-on activity. The browser console catches everything that's catchable. The Firebug console catches most things still.

Plus Nelson comment:

This worked for me, but only after enabling "Show Content messages" in the gear menu of the browser console.

like image 179
KrisWebDev Avatar answered Sep 20 '22 09:09

KrisWebDev