O'Reilly logo

Lingo in a Nutshell by Bruce A. Epstein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required