Narrowing Down Errors

Have you noticed how all three browsers point to the same line as the one containing the error—line 6? This is, in fact, where the error actually occurs (see Figure 10.9).

Figure 10.9. Line 6 contains the error.

This is good news for the JavaScripter. However, every silver lining has a cloud or two:

  • You must open the file and count lines until you find the error.

  • The information it provides isn't clear.

  • It isn't always accurate.

However, Internet Explorer users can take advantage of a program developed by Microsoft to help programmers debug Web pages. This program is called the Microsoft Script Debugger.

TIP

Download the Microsoft ...

Get JavaScript™ 1.5 by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.