简体   繁体   English

如何在Firebug中调试Greasemonkey脚本

[英]How to debug greasemonkey scripts in firebug

How do you set up firebug to debug a grease monkey script? 如何设置Firebug来调试油脂猴子脚本?

I've installed firebug on both my laptop and pc. 我已经在笔记本电脑和PC上安装了萤火虫。 On my laptop it works fine, all the grease monkey scripts are listed under the script tab. 在我的笔记本电脑上,它工作正常,所有油脂猴子脚本均在“脚本”选项卡下列出。 However on my pc they don't appear which is unfortunate because I want to work on my pc. 但是在我的电脑上却没有出现,这很不幸,因为我想在我的电脑上工作。 They've both got the same versions of firebug, firefox and windows and I have tested them on the same webpage. 他们都拥有相同版本的firebug,firefox和Windows,而我已经在同一网页上对其进行了测试。 I can't see any difference in the settings between the 2 machines so am baffled as to why one is working but not the other. 我看不到两台机器之间的设置有什么区别,所以困惑于为什么一台机器正常工作,而另一台机器却没有工作。 Please does anyone have any suggestions as to how to sort this? 请问有人对如何排序有任何建议吗?

You can try using 您可以尝试使用

debugger;

in your code if you haven't already. 在您的代码中(如果尚未安装)。 I've had this work in the past, though it can be finicky. 我过去曾做过这项工作,尽管可能有些挑剔。

通过在firefox中创建新的配置文件对此进行排序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM