How to debug a Firefox Add-on SDK extension?

泪湿孤枕 提交于 2019-12-06 12:38:56

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!