Hi,
I didn't find a way to debug Greasemonkey scripts with the Firebug extension.
Does anyone know how to do this ?
Thanks.
Hi,
I didn't find a way to debug Greasemonkey scripts with the Firebug extension.
Does anyone know how to do this ?
Thanks.
Because Greasemonkey operates in a sandbox, Firebug cannot see it. There is no easy way around this.
General workaround strategies:
Test all parts of a GM script that don't use GM_
functions, in Firebug's JavaScript console first. Minimize use of GM_
functions and don't use GM_log()
at all.
All of Firebug's console
functions work great from within a GM script.
Chromebug can see sandboxed scripts, http://getfirebug.com/wiki/index.php/Chromebug_User_Guide, but I've not tried it on Greasemonkey.
I've tried Chromebug, it doesn't seem to be seeing them.
I have been able to inspect variables in Firebug by adding a debugger line in my GM code. This causes a breakpoint and I can inspect variables on the stack, but the right file is not shown so I can't step or anything.
There also is a extension called Firebugmonkey, but noone seems to know how to use it. I played with it for a while, but I can't figure it out either. https://addons.mozilla.org/en-US/firefox/addon/13623/reviews/
d