All Manuals > LispWorks IDE User Guide > 11 The Debugger Tool


11.3 Simple use of the Debugger tool

When you enter the Debugger tool, the Condition area displays a message describing the error. The Debug > 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 (say fubar ) at the Listener prompt.
  2. Click in the Listener toolbar or choose Debug > Start GUI Debugger to enter the Debugger tool.
  3. Select the Debug > Restarts menu to display the options available.
  4. 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 use the Abort or Continue toolbar buttons to invoke them, instead of choosing the appropriate menu command.

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

  5. In the Listener, set the value of fubar as follows:
  6. (setq fubar 12)
  7. 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; the correct result if the variable had been bound in the first place.

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.

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