简体   繁体   中英

How to debug a Firefox extension with Chromebug?

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:

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM