I'm trying to debug my Firefox add-on with Chromebug, but I can't see the error trace or log trace. I've configured a dedicated profile and set about:config
parameters according to this Mozilla tutorial. I've installed Firebug and Chromebug with the same version (1.7.2) But when I execute one of my extension "action" with "error thrower" code, nothing happened. No log, no trace.
In Chromebug, the file list is empty. I read in multiple discussions on the web that I should see a list of debuggable scripts.
A screenshot of my environment:
What else must I do?
Update April 2014: The browser debugger is now integrated in the "Browser Toolbox" and you no longer need to set about:config prefs. Just use the developer tools configuration/settings panel: "enable chrome debugging" and "enable remote debugging". The "Browser Toolbox" will then be available in the developer tools panel.
Chromebug has not worked for me for many months. I think it's just been silently abandoned but thankfully on Firefox 19 or later, it's possible to use the built-in JS debugger on the browser itself. Go to about:config and set the following two prefs:
devtools.chrome.enabled: true
devtools.debugger.remote-enabled: true
After you restart the browser, the Web Developer menu will contain a "Browser Debugger" entry.
More info here: https://developer.mozilla.org/en/docs/Debugging_JavaScript
If possible, I'd suggest using Aurora for your debugging because the built-in debugger was a little limited when first launched and keeps getting better with every release.
来源:https://stackoverflow.com/questions/17547364/how-to-debug-a-firefox-extension-with-chromebug