Debugging Javascript code

What's the best way to debug javascript? I'm currently using Firefox 4 with the latest Firebug. I love Firebug, DOM and debugging control is good. Unfortunately, it doesn't always report errors. My javascript app will just kind of stop working (crash) and the Console -> Errors (or All) tab will be blank. So then I have to go through the debugger, set my breakpoints and step through the code. Stepping through the code isn't as intuitive sometimes as you might think either (occasionally it'll jump to jQuery code or some other library). Can be a pain.

I always fix the bugs, I'm just hoping there's a quicker way to do so. Being informed of errors as they happen would make my work go a lot faster...

Is there a better tool than Firebug? Is there a setting I need for Firebug to always report errors? Should I use a different browser for debugging?

5
задан at. 14 April 2011 в 17:38
поделиться