Breakpoints

A breakpoint is a marker you can place on a line in a script. When a breakpoint is encountered while the application is running, the application will stop just prior to executing the line of code on which the breakpoint was placed. When stopped at a breakpoint, you can examine the state of the application.

Setting breakpoints

Once you’ve selected a script and it appears in the Script Debugger window, you can set breakpoints. To set a breakpoint, place the insertion point in the line where you want to set the breakpoint, then click the Toggle Breakpoint button. A red dot indicates a breakpoint is set. To remove a breakpoint, place the insertion point in the line containing the breakpoint and click the Toggle Breakpoint button again.

[spacer]

You can’t set breakpoints on comment lines. The Script Debugger will set a breakpoint on the next available line if you try to do so.


Breakpoints can be set in either tools mode or test mode. Moving between tools mode and test mode doesn’t affect breakpoints. The breakpoints you set will remain in the scripts until you specifically remove the breakpoints or quit Dexterity.

Breakpoints window

To view a list of the breakpoints you’ve set, choose Breakpoints from the Debug menu.

You can enable, disable or delete a breakpoint by selecting it in the list and clicking the appropriate button. The enabled status for a breakpoint is indicated by the + or - in the second column of the breakpoints list (+ is enabled, - is disabled). If the Ignore All Breakpoints check box is marked, causing all breakpoints to be ignored, all enabled breakpoints will be indicated with a small “e”, while disabled breakpoints will be indicated with a small “d”.

You can debug the script containing a breakpoint by selecting the breakpoint in the list and clicking Debug. To delete a breakpoint, select it and click Delete. Click Delete All to delete all breakpoints.

Breakpoint options

You can set additional options to specify when a breakpoint should halt execution. To do so, select a breakpoint in the list and click Options. The Breakpoint Options window will appear.

Use this window to specify whether the breakpoint will be conditional or unconditional. Unconditional breakpoints always stop execution when they are encountered, unless they have been disabled. Conditional breakpoints stop execution only if the specified conditions are met. The following table describes the conditions you can specify for a conditional breakpoint.

[spacer]

Condition

Description

Break When Expression is True

Breakpoint is honored when the boolean sanScript expression entered in the field below the option is true.

Break After Nth Occurrence

Breakpoint is ignored until it has been encountered the number of times indicated. After this number of encounters, the breakpoint is honored like a normal breakpoint.

Break For N Occurrences

Breakpoint is honored the until it has been encountered the number of times indicated. After this number of encounters, the breakpoint is ignored.



Documentation Feedback