views:

44

answers:

2

Every once in a while, some feature on a site I use will be broken/have annoying behavior that I want to change with a greasemonkey script. When I try to debug the site using firebug to find out what code is called from an event by using "Break On Next", firebug just breaks immediately to show some jQuery code that is always running. As an example, http://pc.ign.com/ does this. Is there any solution to this? I just want to see what code is running as a result of a mouse click or keypress but it's impossible to use "Break On Next" since jQuery is always running something.

+1  A: 

More info you can find on the link I've supplied there are also more debugging options provided. Hope that will help you

http://thecodecentral.com/2007/08/01/debug-javascript-with-firebug

Skelton
That's just setting break points though. I was hoping there was a way that didn't require me to go through the sometimes massive code for a website just to find what code gets called when I click something. I've done it this way before and it's such a slow process.
Telanor
A: 

When dealing with bound jQuery events, I highly recommend firequery
It will show jQuery event bindings in the dom inspector, and let you click through to the associated code.
This is not a particularly close solution however, and i myself often find myself following your above process.

MrNibbles
I have firequery actually and while it is nice, there are still a lot of times when it's hard to find where an event is attached
Telanor