views:

132

answers:

4

with firebug i only knows how to see what ajax-files are called.

i have a jquery mouse click event handler bounded to a link element.

is it possible to see what javascript code is used when clicking on an element in case you forgot if you got an event handler or other javascript code coupled to it?

+3  A: 

Use breakpoints ..

reference: http://getfirebug.com/javascript

Gaby
+3  A: 

You can use the profiler in Firebug. Go to the Console tab, and click Profile above the message area, next to Clear. It will say that the profiler is running. Click the Profile button again, and you'll see a report on what functions were called and how much time was spent in each one.

If you're using a library like jQuery, the output may be little less clear since it will show much of the time was spent in functions from the library (i.e. F(), init(), dimension(), etc). It will show which file each function was defined in though, so you can disregard the ones that are in the library (unless that's what you're looking for).

If you're using anonymous functions, you can give them names so they show up in the profiler - see this article for a thorough (possibly too thorough) explanation.

Alex JL
A: 

You should take a look at Eventbug (it requires Firefox 3.6, some of the docs are old):

Downloads: http://getfirebug.com/releases/eventbug/1.5/

Some background: http://www.softwareishard.com/blog/firebug/eventbug-alpha-released/

sroussey
A: 

Just add 'debugger;' at your onclickevent, and happy debug it.

*Important: you gotta open the firebug panel and Reload the page

Fabiano PS