MintUser
MintUser

Reputation: 103

Attach Firefox developer console to add-ons

Is there a way to attach a developer console to Firefox add-ons and debug the add-on inside the browser just like Chrome?

Also, I found a setting under about:config called extensions.logging.enabled. Where would these logs appear?

Upvotes: 1

Views: 198

Answers (2)

Luckyrat
Luckyrat

Reputation: 1455

You should use Firefox 29+ (currently Aurora). Then open the standard debugger (e.g. ctrl-shift-K), click on the cog on the left to configure developer tools and tick the advanced setting for "enable chrome debugging". Close the debugger window and go to the developer tools menu (via the top right menu button in the new Firefox UI).

Click "Browser toolbox" and you'll get more-or-less the full set of console and debugging tools (once you accept the "allow remote control?" dialog that seems to always appear invisibly behind your focussed window).

https://developer.mozilla.org/en/docs/Debugging_JavaScript is also a good reference point but it's not always 100% up to date with the pre-release versions of Firefox.

A similar process will work for earlier versions of Firefox but instead of the browser toolbox you'll need to launch the "browser debugger" on its own (and I think a browser restart is required after enabling the chrome debugging option).

Upvotes: 0

Noitidart
Noitidart

Reputation: 37328

Press Ctrl+Shift+J. It opens the browser console you can watch everything. Make sure to set up your developer preferences though: See the "Recommended development preferences" section under: https://developer.mozilla.org/en-US/Add-ons/Setting_up_extension_development_environment?redirectlocale=en-US&redirectslug=Setting_up_extension_development_environment#Development_preferences

Upvotes: 1

Related Questions