12 The Debugger Tool

12.3 Simple use of the debugger tool

When you enter the debugger tool, the Condition area displays a message describing the error. The Restarts menu lists a number of restart options, which offer you different ways to continue execution.

1. For example, type the name of a variable which you know is unbound (sayfubar) at the listener prompt.

2. Choose Debug > Debugger to enter the debugger tool.

3. Select the Restarts menu to display the options available.

A number of restarts are displayed that offer you different ways in which to proceed. These are the same options as those displayed at the command line debugger before you invoked the debugger tool.

Two special restarts can be chosen: the abort and continue restarts. These are indicated by the prefixes (abort) and (continue) respectively. As a shortcut, you can click on the Abort or Continue buttons to invoke them, instead of choosing the appropriate menu command.

4. Click Continue to invoke the continue restart.

Different operations are performed in different circumstances. In this case, you can evaluate the form again. If you first bind the variable to some value, and then invoke the continue restart, the debugger is exited.

5. In the listener, set the value offubar as follows:

(setq fubar 12)

6. Click Continue in the debugger tool.

The debugger tool disappears, and the command line debugger is exited in the listener, and the value 12 is returned, as you would expect.

You can also click Abort to invoke the abort restart. This restart always exits the current level of the debugger and returns to the previous one, ignoring the error which caused the present invocation of the debugger.

In general, you should use the continue restart if you have fixed the problem and want to continue execution, and the abort restart if you want to ignore the problem completely and stop execution.

Common LispWorks User Guide, Liquid Common Lisp Version 5.0 - 18 OCT 1996

Generated with Harlequin WebMaker