Debug Javascript With Firebug


I didn't even realise there were sophisticated tools (or any tools) out there that would enable me to debug javascript. However, after encountering several problems with my jquery code today, I finally had enough of using the alert() method of debugging, and went in search of something better.

I knew of Firebug, but I thought it was something to do with validating CSS and HTML. It does quite a bit more than that, actually. Including the debugging of javascript! Firebug allows you to add breakpoints, "run" your page, step through breakpoints and inspect variable values. Yes! This is just what we need. I didn't know this was possible, even though I routinely debug ibm i rpg programs using these invaluable features.

You can download Firebug here (for Firefox).

I get the impression that the new version of Firebug - 2.0.7 - has only recently been released and that much has changed. Unfortunately, there is a dearth of tutorials on Firebug 2.0.7 on the web at the moment, so I see a niche market for my dulcet tones. Stay tuned.