admin管理员组

文章数量:1294642

I'm trying to reverse-engineer some JavaScript and, annoyingly, the JS isn't terribly clear or well-documented. I've got a series of events that are fired (using JQuery) that I need to find where the function lives.

Is there a way of configuring Firebug (or the Opera/IE consoles - not Chrome/Safari) so that I can see what events are fired when I click a button?

Thanks

I'm trying to reverse-engineer some JavaScript and, annoyingly, the JS isn't terribly clear or well-documented. I've got a series of events that are fired (using JQuery) that I need to find where the function lives.

Is there a way of configuring Firebug (or the Opera/IE consoles - not Chrome/Safari) so that I can see what events are fired when I click a button?

Thanks

Share Improve this question asked Mar 7, 2012 at 10:01 MrSimonEmmsMrSimonEmms 1,4813 gold badges18 silver badges35 bronze badges 1
  • 2 you shoud accept an answer to mark this question as solved... – Christoph Commented Mar 26, 2012 at 12:59
Add a ment  | 

4 Answers 4

Reset to default 10

In firebug, select console tab. Click on profile, do your activity on page, again click on profile...list of called function will be listed below in firebug panel.

I suggest that you get started with the "Using FireBug Console for Faster JavaScript Development" tutorial.

You could add a console.log() to every click method. Or simply add an Event listener to the document and console.log() some details or the event when something is clicked.

You can use the Firebug Profiler, e.g. by calling profile() in the console before your action and profileEnd() after the action. Firebug will then tell you which methods have been executed in the meantime (incl. lots of information about it).

本文标签: jqueryHow do I use Firebug to tell me what JavaScript is being firedStack Overflow