I\'m currently developing a firefox extension. I use dump()
function. But the messages are not showing up in the console. I\'ve cahnged the value of brows
Starting Firefox with -console
command line switch is only necessary on Windows. If you are using Linux then you should simply start Firefox from a terminal window. On Mac OS X the console messages can be displayed via some application (sorry, don't remember which one). Also, changing browser.dom.window.dump.enabled
is only necessary if you are logging from a window-bound context - in JavaScript modules and such it always works regardless of this preference.
If you want to have your logging messages available more easily you should be using Components.utils.reportError() (or nsIConsoleService.logStringMessage()
as explained in the documentation) - this will send messages to the usual Error Console that can be opened at any time.
I find this addon to be really helpful when logging errors/messages to the console: https://addons.mozilla.org/en-US/firefox/addon/console%C2%B2/
To finally get the output from dump(), I specified dump file location by creating a preference browser.dom.window.dump.file
and setting it in about:config.
I believe I had the same issue. I couldn't get dump() to print to stderr nor the console even though I had set browser.dom.window.dump.enabled
to true
. I'm on Ubuntu 14.04.
Source: https://developer.mozilla.org/en-US/docs/Mozilla/Preferences/Preference_reference/browser.dom.window.dump.file