Debugging JavaScript

I finished reading a whole chapter on JavaScript debugging techniques. Luckily I have been debugging my code all throughout the book. So this topic was close to my heart.

The thing I like about JavaScript is that it is interpreted. The interpreter knows exactly where it is in the code when it encounters a problem. This allows the browser to report the exact line number where there is a problem.

With compiled languages, you might be only able to approximate where you are in the code when a problem occurs. I have not yet tried either of the tools from Mozilla or Microsoft to step through the JavaScript code. However I bet those will come in handy as my JavaScript programs get larger and larger as I learn more.