javascriptfirefoxfirefox-addonfirefox-5

enabling Firefox 5.0 javascript dump()


I'm going through firefox extension writing bootcamp and somewhere along the way the video's author is speaking about switching browser.dom.window.dump.enabled in about:config to true. This option is no longer present in firefox 5.0. From what I read during my google searches, in ff 4.0 you had to create this preference yourself, and it seems like in firefox 5.0 it doesn't work anymore - I can't seem to dump information to firefox error console any more (regardless of whether console2 is enabled or not).

Relevant code:

Here's how I'm launching the browser:

/usr/bin/iceweasel -profile /some/path -no-remote -jsconsole

And here's the code that only shows the alert, without writing anything to the error console:

onCommand: function(event) {
  toJavaScriptConsole("toJavaScriptConsole: hello world");
  dump("Hello world!\n");
  alert("Hello world!\n");
}

Any idea what I can do to have working dump() called from the ff extension I'm working on in firefox 5.0?


Solution

  • You confused the error console with plain linux console - if you run firefox from terminal you should see the dumps right there.

    in-depth explanation