3

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.

2
  • Set a breakpoint in the script. Commented Sep 26, 2010 at 4:51
  • But this is usually not so easy to corresponding script code! Commented Nov 18, 2012 at 15:56

2 Answers 2

1

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

Sign up to request clarification or add additional context in comments.

1 Comment

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.
0

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.

1 Comment

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.