What is the best way to debug Javascript code using any tool..i.e. i want to know when a button is clicked, what all JS code gets executed...
I wanted to test in Firefox and Safari..Already tried Firebug, but want to know if there is any better way..
Also more importantly i want to know "how" exactly to debug the code?
Also is it possible to print the complete JS code that gets called when I say press a button?
I always use the integrated web inspector tool from Google Chrome (you know, right-click, Inspect element). It works quite well for me, and has all the functions I need.
This post, using FireFox's FireBug and jQuery, might help you detect and capture all of the events bound to a button so you can tell what JS code is run when the button is clicked:
How to debug JavaScript/jQuery event bindings with Firebug (or similar tool)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With