How to debug Greasemonkey script on Firefox 30?

末鹿安然 提交于 2019-12-03 17:22:51

The only way I found to do it actually (v.42) is to use the remote debugging system. If you want to reproduce:

  1. create a profile without addon to considerably increase speed.
  2. install greasemonkey addon on it.
  3. use remote debugging: https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging/Debugging_Firefox_Desktop
  4. use another firefox profile to start webIDE, no success in debugging same profile.
  5. distant debug the profile in 1..While selecting go "Open app" > "RUNTIME APPS", select main process.

Your script will appear in the debugger tab under "file://". You will be able to set breakpoints, spy, ...

Or if you simply want to debug your script then you can use Chrome with Tampermonkey.

Tampermonkey works almost identical to Greasemonkey so if your script works on Tampermonkey it should work on Greasemonkey.

Just remember that if install from file system then you need to enable access for Tampermonkey. See video in the FAQ on how to enable this: http://tampermonkey.net/faq.php#Q204

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