The Script Debugger window

The Script Debugger window, shown in the following illustration, allows you to view and set breakpoints in scripts.

To open this window, choose Script Debugger from the Debug menu. The Script Debugger window also appears when a breakpoint is encountered while an application is running.

Debugger controls

The buttons at the top of the Script Debugger window allow you to select scripts, insert and remove breakpoints, and control the script debugger when a breakpoint is encountered. Each button is described in the following table.

[spacer]

Button

Name

Description

Open Script

Opens the Open Script window, allowing you to select a script to debug.

Edit Script

Opens the Script Editor, allowing you to edit the script currently displayed in the Script Debugger window.

Toggle Breakpoint

Inserts or removes a breakpoint on the line where the cursor is located. A breakpoint is indicated by a red dot at the beginning of the line.

Go

When stopped at a breakpoint, the Go button causes the application to continue executing until all scripts finish or another breakpoint is encountered.

Step

Causes the application to execute the next line in the current script.

Step In

If the application is stopped on a line that calls a procedure or user-defined function, or uses the run script statement, clicking Step In causes the called script to appear in the Script Debugger window. Execution stops on the first line of that script.

Step Out

If stopped in a procedure or user-defined function, or a script executed with the run script statement, clicking Step Out causes the current script to run to completion. The calling script is displayed in the Script Debugger window, and execution stops on the line following the line that made the call.

Set Next Statement

If stopped at a breakpoint, clicking the Set Next Statement button makes the line where the cursor is located the next line that will be executed. Execution will continue when you choose Go, Step, Step In or Step Out.

Exercise caution when using this feature. It will alter the order that statements are executed in the application and may cause different results from when the application runs normally.


Context menu

The Script Debugger window has a context menu that is available in test mode. You can use the context menu to copy the selected text, add a watch based on the selected text, toggle a breakpoint on the current line, or set the next statement to execute.

Opening scripts

To open a script to debug, click the Open Script button in the Script Debugger window.

  1. Indicate the type of script to open.

Click the appropriate tab indicating whether you want to open a form-level script, a procedure script, or a user-defined function.

  1. Select the series or core the script is part of.

If you’re opening a form-level script, select the series the form is part of. If you’re opening a procedure or user-defined function, select the core the script is part of.

  1. Select the appropriate options indicating the script you want to open.

If you’re opening a procedure script or a user-defined function, simply select the script in the Scripts list and click OK. If you’re opening a form-level script, select the form and then use the drop-down lists and remaining list boxes to navigate to the type of script you want to open. When the script name appears in the Scripts list, select it and click OK.


Documentation Feedback