I\'m currently working on a simple extension for Firefox. Now I would like to be able to issue some commands in a console in the extensions context.
I have installe
Firefox now has a built-in debugger that easy rivals, and perhaps surpasses firebug, chromebug or venkman.
You need to enable (or create) 2 particular options in about:config
for extension debugging to work:
devtools.chrome.enabled: true
devtools.debugger.remote-enabled: true
And then click the new "Browser Debugger" entry in the Web Developer menu. The "Browser Console" is also very useful.
The official documentation mentions that this will work from Firefox 19, but actually it will only work well on all extension code from Firefox 23 onwards. (If you try this before Firefox 22 is released, just install the latest nightly build.)
Also note that if you're editing extension code directly you will need get Firefox to refresh e.g. by using the reload all chrome extension using the tips mentioned in this answer before the debugger will list the updated code.
Update: Firefox v32 and later has built-in debugging support for restartless and SDK-based add-ons. As stated in Mozilla's documentation, the "remote debug" mentioned above now has a checkbox in the Web Developer pane's settings:
You can then go to the add-ons -> extensions tab and click "debug" alongside the name of you extension.