8 The Debugger

8.3 Simple use of the debugger

Note: The debugger may also be invoked by using the tracer to force a break at entry to or exit from a particular function. See Chapter 9, "The Tracer".

Upon entering the debugger, a message describing the error is printed, and a number of options presenting ways to continue execution -- called restarts -- are listed.

CL-USER 6 > fubar

Error: the variable FUBAR is unbound.
  1 (continue) Try evaluating it again.
  2 Return a value to use.
  3 Return a value to set it to.
  4 (abort) return to level 0.
  5 return to top level loop 0.

Type :c followed by a number to proceed

CL-USER 7 : 1 >

Two special restarts can be listed: the abort and continue restarts. These are indicated by the prefixes (abort) and (continue) respectively.

The continue restart can be invoked by typing :c alone. It performs different operations in different circumstances -- in this case, it allows you to evaluate the form again. If you first bind the variable to some value, and then invoke the continue restart, you will leave the debugger:

CL-USER 7 : 1 > (setq fubar 12)
12

CL-USER 8 : 1 > :c
12

CL-USER 9 >

The abort restart can be invoked by entering :a. It always exits the current level and returns to the previous one, ignoring the error which caused the present invocation of the debugger.


FreeLisp User's Guide - 5 FEB 1996

Generated with Harlequin WebMaker