Since ChromeBug for Firefox seems no longer maintained, Venkman remains the only alternative for debugging Firefox addons (Firebug won't work for addons).
Using Venkman has many gotchas, I try to document them here to make the debugger more-or-less usable. I've been able to debug addons on Firefox 15 that call NPAPI plugin generated with FireBreath this way.
Still, Venkman is pain at times (it is buggy itself).
This text was generated by doxygen, I've put the source here:
It is suggested that you use a clean profile for debugging your extension using:
firefox -no-remote -P new-profile-name
First time the above command is run, you'll get the profile manager popup. Once you create the named profile "new-profile-name", it will use that named profile.
Install Venkman from addons.mozilla.org:
Install your addon into Firefox and restart.
First of all, in Venkman's menu uncheck from menu Debug-Exclude Application Files:
Look for the tab/window "Open windows". By default it's a tab next to "Loaded Scripts":
You'll use it often, let's put it to a better accessible place:
"Open Windows" dockwindow with a treeview should appear at bottom left:
The treeview root should read "browser.xul" and not "Browser Window" - make sure you unchecked that "Exclude application files" before.
Right-click "browser.xul" and check "Set as evaluation object" from context menu:
If you don't see your xul/js file in the "Loaded Scripts" dockwindow, switch to Firefox browser window (don't close Venkman window). Open a tab with some page that will trigger your script somehow. Now your source file hopefully appear in Venkman.
Expand the tree under your source file or double-click to see it in "Source code" window. Scroll to desired line, put a breakpoint there by clicking the column left to line number (or from context menu by right-clicking the line).
Go to Firefox browser and do an action that should trigger the line where you put the breakpoint.
If "normal" way of setting breakpoint does not work, here is a hackish workaround. It's a method of last resort, really.
This is a very annoying bug. Happens for me on one installation after every start of Firefox (not restart), other installation is OK. It looks like this:
License for this text: WTFPL (do whatever the fuck you want public license)