Setting Breakpoints

A breakpoint or TRAP may be set on any statement or variable within the foreground source file that is a component of a loaded library. A breakpoint on a statement can be set by double clicking with the mouse in the left hand margin by the statement to be trapped. The presence of a breakpoint is signified by a red circle in the left margin of the source line. Clicking this way acts as a toggle so you can remove an existing breakpoint by clicking again. Alternatively the Toggle breakpoint key ('B', available only in debug mode) can be used if a mouse is not available. Traps can also be set using the Trap menu.

A trap on a variable is set by selecting the variable and either bringing up a right click context menu or selecting the Select Trap on Variable option from within the Trap menu. Like normal traps this option works as a toggle, therefore attempting to trap a variable a second time removes the trap.

All traps can be removed with the Clear All Traps option from within the Trap menu.

Currently defined traps are displayed in the trap window. This allows editing and deleting of these traps. In particular you can add conditions to a trap using the trap dialog which can be invoked from this window.

Traps can also be set and deleted with the TRAP immediate mode statement in the console window. Only traps set this way will remain in position through successive program loads. Breakpoints set in the workbench are inserted into a copy of the code and will be lost if the program line is dropped or replaced following a LOAD.