The Lingo Debugger

A good programmer can often correct simple errors by simply inspecting the code, just as a good speller doesn’t need a dictionary or a spellchecker. But experienced programmers constantly use the Lingo Debugger whereas beginners don’t even seem to know it exists. Refer to Chapter 4, Troubleshooting, in Macromedia’s Learning Lingo manual for a brief overview.

Tip

The Debugger is a diagnostic tool. It does not debug your program for you any more than an X-ray cures disease. The Debugger can show you what Lingo commands are being executed and the values held in various variables. See also the Watcher window in Figure 3-4.

The Debugger Window

Figure 3-1. The Debugger Window

Script Errors

When Director compiles a script—see "Entering and Compiling Scripts“” in Chapter 1 and "Compiling Scripts" Chapter 2—it checks that your Lingo code has a recognizable structure and acceptable keywords. It does not attempt to actually run your Lingo code. Recompile to help find typographical errors.

A so-called compile-time or syntax error causes a dialog box to appear, indicating what Director suspects is wrong.

A Script Error Dialog

Figure 3-2. A Script Error Dialog

Tip

Script errors are your friends. Read the error message carefully; Director will tell you which line confused it.

Unfortunately, when you close the Script window (which ...

Get Lingo 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.