GM scripts are executed in greasemonkey.js, more exactly, in the
evalInSandbox method, which in turns calls the native function
Components.utils.evalInSandbox [1]:
(greasemonkey.js, 223) Components.utils.evalInSandbox(code, sandbox);
Being written in C++, this cannot be debugged with Venkman.
Maybe there is way to slightly modify greasemonkey.js in order to
substitute the native evalInSandbox with something else that can be
debugged?
Incidentally, while searching for information regarding this
possibility, I came across Mozilla Security Advisory 2006-31 [2]. I'm
more than a bit surprised that this, being critical for GM, hasn't
been mentioned in this list till now. This should be discussed in
another thread, though.
[1]
http://developer.mozilla.org/en/docs/Components.utils.evalInSandbox[2]
http://www.mozilla.org/security/announce/2006/mfsa2006-31.html2006/8/21, Dave Land <
land@...>:
> On Aug 11, 2006, at 3:30 AM, James Cowan wrote:
>
> >
> > Is it possible to use Venkman to debug a gm user.js script?
>
> Did you ever get an answer to this question?
>
> Dave
> _______________________________________________
> Greasemonkey mailing list
>
Greasemonkey@...
>
http://mozdev.org/mailman/listinfo/greasemonkey>
_______________________________________________
Greasemonkey mailing list
Greasemonkey@...
http://mozdev.org/mailman/listinfo/greasemonkey