All Manuals > LispWorks IDE User Guide > 24 The Stepper > 24.6 Breakpoints


24.6.2 Conditional breakpoints

A breakpoint can be modified to make it effective only when a condition is true.

Suppose that you have reached a breakpoint on the call to + as set in the example above. To make this breakpoint conditional on a variable *use-my-breakpoints* (which you should define with defvar ), choose Stepper > Edit Breakpoints... or choose Expression > Edit Breakpoints... from the context menu:

Figure 24.6 The Edit Breakpoints menu

Select your breakpoint in the Breakpoints dialog and choose Edit... to display the Edit Breakpoint dialog.

Select the Condition radio button in the Conditional tab of the Edit Breakpoint dialog, then enter *use-my-breakpoints* in the condition area and click OK .

Figure 24.7 The Edit Breakpoint dialog

The form defining the breakpoint condition is evaluated in the package where the stepped function was defined. Note that this package is displayed in the Conditional tab of the Edit Breakpoint dialog. Therefore, after confirming the dialog shown above, your code breaks at the breakpoint depending on the value of common-lisp-user::*use-my-breakpoints* .

To make a breakpoint unconditional, select Unconditional in the dialog shown above.

Note: you cannot currently access the values of local variables in the condition expression.

LispWorks IDE User Guide (Macintosh version) - 25 Nov 2011