When this happened to me I used alert()s to debug the script because
they halt the execution of the script.

Simple alert('foo'); lines at the top-level of the script and counting
how many show will help figure out where the hanging code starts.
Going more detailed will let you figure out more specifically what's
going on, using different messages for different areas of the code.


kwah


On 8 August 2011 04:45, John Nagle <[email protected]> wrote:
>  I have a complex Greasemonnkey script which hangs Firefox when working on
> certain pages.
> When Firefox hangs, its visible window greys out, CPU usage goes to 100% of
> one CPU,
> and the program is considered "Not Responding" by Windows.
>
>  I've tried installing FireBug, but when Firefox hangs, so does the Firebug
> window.
>
> (It's probably not a simple "code in an infinite loop", but something more
> like
> change events on the target page triggering change events in the
> Greasemonkey
> script and vice versa.)
>
>  How can I debug this?
>
>                                            John Nagle
>
> (Firefox 5, Windows 7, Greasemonkey 0.9.8)
>
> --
> You received this message because you are subscribed to the Google Groups
> "greasemonkey-users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/greasemonkey-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en.

Reply via email to