Debugging with breakpoints

A breakpoint interrupts script execution just before the statement at which the breakpoint is set. While script execution is interrupted, you can examine and modify the values of variables and use other debugger commands. Breakpoints cannot be set for the Terminate event.

After you set a breakpoint, you can permanently clear it, temporarily disable it, or enable it again. Breakpoints are displayed as red stop signs Red stop sign indicating a break point when enabled and red stop signs with yellow slashes Stop sign with yellow slash to indicate a break point is disabledwhen disabled.

For a statement continued over multiple lines, the last line is highlighted during stepping and stopping on a breakpoint. To set, disable, enable, or clear a multi-line statement, you must select the last line.

A breakpoint remains in a script until you explicitly clear it. When an executing script first displays in the debugger, any breakpoints that were not cleared from the last debugging session reappear.

Note: Persistent breakpoints are new with Release 6.

The debugger provides the following breakpoint facilities:

  • Set a breakpoint

    Select a statement at which no breakpoint is currently set. Double-click the statement, choose Debug - Set/Clear Breakpoint, or press F9.

  • Clear a breakpoint

    Select a statement at which a breakpoint is currently set. Double-click the statement once if the stop sign has a yellow slash or twice if the stop sign is solid red, choose Debug - Set/Clear Breakpoint, or press F9. To clear all breakpoints from all scripts in the active document, choose Debug - Clear All Breakpoints.

  • Disable a breakpoint

    Select a statement at which an enabled (solid red stop sign) breakpoint is set. Double-click the statement or choose Debug - Disable Breakpoint. To disable all breakpoints from all scripts in the active document, choose Debug - Disable All Breakpoints or press SHIFT+F9.

  • Enable a breakpoint

    Select a statement at which a disabled (red stop sign with yellow slash) breakpoint is set and choose Debug - Enable Breakpoint. To enable all breakpoints from all scripts in the active document, choose Debug - Enable All Breakpoints.

  • Continue script execution

    To start executing the current script or to resume execution after the script is interrupted at a breakpoint, click Continue, choose Debug - Continue, or press F5.