问题
I am working on code for a Firefox Add-on SDK extension. I want to debug it.
Can we debug it like we do in Firebug? Firebug is not working for my add-on.
回答1:
First result on Google…
To enable the Add-on Debugger you need to check the "Enable chrome and addon debugging" and "Enable remote debugging" settings in Firefox.
To do this, select "Toggle Tools" from the Web Developer menu in Firefox, open the Developer Tools Settings, and check "Enable chrome and addon debugging" and "Enable remote debugging".
Now open the Add-on Manager. Next to the entry for your add-on you will see a button labeled "Debug". Click this button to launch the debugger.
Next you'll see a dialog asking you to accept an incoming connection. Click "OK", and the debugger will start in a separate window.
回答2:
As of July 2016:
You can use the Firefox Add-on Debugger.
Use the command jpm run --debug.
Then click on "OK" when asked to accept the incoming connection:
?
You will then have a debugger window from which you can select your JavaScript files:
I copied most of this answer from my answer to a different question.
来源:https://stackoverflow.com/questions/27286845/how-to-debug-a-firefox-add-on-sdk-extension