JavaScript Debugger

Dreamweaver 4 includes a JavaScript debugger that allows you to debug JS code, but there are some caveats.

The debugger:

  • Requires NN4.5+ (Macintosh and Windows, but excluding NN6) or IE4+ (Windows only).

  • Requires that both Java and JavaScript be enabled in your browser’s preferences.

  • Will debug JS code embedded in HTML documents or stored in external .js files.

  • Will not work in any version of IE on the Mac, in any version of NN6 on either platform, or in Opera.

  • Will not debug JS code when you use frames. You must debug each framed HTML page separately.

  • Will not debug JS code in templates or documents attached to templates. You must detach a document from its template before debugging it.

  • May not work on the Macintosh if TCP/IP access is set to AppleTalk or PPP. The workaround, as described in Macromedia TechNote 15020, is to change the TCP/IP setting to connect via a different method.

  • May hinder system performance or interfere with other operations such as viewing the Help files in the browser. Close the debugger when it is no longer needed.

Running the Debugger

To run the debugger you must brave a slew of dialog boxes:

  1. Open the HTML document you want to debug (you can’t start the debugger while editing as .js file). Save any recent changes to the file.

  2. With your HTML document open, select File Debug in Browser browser.

  3. Dreamweaver checks your code for syntax errors and reports errors in the JavaScript Syntax Errors dialog box shown in Figure 12-7.

  4. If there are no syntax ...

Get Dreamweaver in a Nutshell 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.