User Guide

98 Chapter 4: Debugging Scripts in Director
When you are finished debugging, you can exit the Debugger at any time:
To resume normal execution of code an exit the Debugger window:
Click the Run Script button.
To exit the Debugger and stop playback of the movie:
Click the Stop Debugging button.
Editing scripts in debugging mode
When you are in debugging mode, you may edit your scripts directly in the Debugger window.
This enables you to fix bugs as soon as you find them and then continue debugging.
To edit a script in the Debugger window:
1 Click in the Script pane and place the insertion point where you want to begin typing.
2 Enter the changes to the script.
You can jump to a specific handler by selecting the name of the handler and clicking the Go To
Handler button.
3 When you are finished debugging and editing scripts, click the Stop Debugging button. The
Script window returns to Script mode.
4 Click the Recompile All Modified Scripts button.
Debugging projectors and Shockwave movies
This section discusses debugging during runtime in Director projectors and movies that contain
Macromedia Shockwave content. You can use either the Message window or enable full script
error dialog boxes to debug projectors and movies that contain Shockwave content.
To debug using the Message window:
Set the Player objects debugPlaybackEnabled property to TRUE.
When this property is
TRUE, playing back a projector or a movie that contains Shockwave
content opens a Message window (Windows) or a Message text file (Macintosh), and the
results of any
put() or trace() function calls are output to these formats.
If at any time during the movie the
debugPlaybackEnabled property is set to FALSE, the
Message window or text file is closed and cannot be opened again during that playback session,
even if
debugPlaybackEnabled is set back to TRUE later in that session.
To debug by enabling full script error dialogs:
In an .ini file for a projector or a movie that contains Shockwave content, set the
DisplayFullLingoErrorText property to 1.
This generates more descriptive error text in the script error dialog box than the generic error
text. For example, a generic error message might look like:
Script error: Continue?
Setting the DisplayFullLingoErrorText property to 1 could generate the following
error message:
Script error: list expected
For information on creating and modifying an appropriate .ini file for a projector or a movie
that contains Shockwave content, see the Director.ini template file in the root Director
installation folder.