MrSimonEmms
MrSimonEmms

Reputation: 1481

How do I use Firebug to tell me what JavaScript is being fired?

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

Upvotes: 6

Views: 1760

Answers (4)

sandeep
sandeep

Reputation: 2234

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.

Upvotes: 10

Mikhail
Mikhail

Reputation: 9285

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

Upvotes: 1

devnull69
devnull69

Reputation: 16544

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

Upvotes: 0

mas-designs
mas-designs

Reputation: 7536

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.

Upvotes: 0

Related Questions