At runtime, the debugger informs you of all errors or unhandled exceptions that stop script execution. If your application is running in test mode, certain errors allow you to directly edit scripts to fix them.
When an error halts a script in test mode, the alert message dialog box will contain two buttons. An example is shown in the following illustration. In this example, a division by zero error was encountered during script execution.
Click OK to return to test mode. Click Debug to see the name of the script that encountered the error. An example of the window that displays the name of halted scripts is shown in the following illustration.
The set of scripts that were being processed at the time the application stopped will be displayed in the window. The topmost script is the first one that was called. If it called a second script, the second script will be shown on the next line, and so on. The script at the end of the list was being run when the error was encountered. Values shown after a script name are the parameters that were passed to the script.
Click the Where button to open the Script Editor. The script that halted will be opened, and the insertion point will appear on the line where execution halted. You may edit the script normally at this point. Depending upon the error encountered, it may be necessary to restart your application in test mode before testing it again.
As with any debugging tool, the Dexterity runtime debugging feature can take you only to the point where it was no longer able to continue script processing. The actual cause of an error, such as a variable that was assigned an invalid value, might be in a different location.