
3.2 Entering and exiting the Debugger
For example, if you create a global variable but use it before its value is assigned, you enter the Debugger:
> (defvar *favorite-ice-cream*) *FAVORITE-ICE-CREAM*If you attempt to set the value of> *favorite-ice-cream* >>Error: The symbol *FAVORITE-ICE-CREAM* has no global value. SYMBOL-VALUE: Required arg 0 (S): *FAVORITE-ICE-CREAM* :C 0: Try evaluating *FAVORITE-ICE-CREAM* again :A 1: Abort to Lisp Top Level ->
*favorite-ice-cream* to an unbound symbol, a new error is signaled and you enter a second Debugger level:
-> (setq *favorite-ice-cream* chocolate)
>>Error: The symbol CHOCOLATE has no global value.
SYMBOL-VALUE:
Required arg 0 (S): CHOCOLATE
:C 0: Try evaluating CHOCOLATE again
:A 1: Abort to Debugger Level 1
2: Try evaluating *FAVORITE-ICE-CREAM* again
3: Abort to Lisp Top Level
->->
The Debugger displays a new error message and a new list of options; note that the prompt now consists of two arrows (->->), indicating that you have entered a second Debugger level.You can enter a third Debugger level by typing another invalid expression:
->-> (setq *favorite-ice-cream* vanilla)
>>Error: The symbol VANILLA has no global value.
SYMBOL-VALUE:
Required arg 0 (S): VANILLA
:C 0: Try evaluating VANILLA again
:A 1: Abort to Debugger Level 2
2: Try evaluating CHOCOLATE again
3: Abort to Debugger Level 1
4: Try evaluating *FAVORITE-ICE-CREAM* again
5: Abort to Lisp Top Level
->->->
The Debugger prompt now consists of three arrows to indicate a third Debugger level. You can return to a previous Debugger level and retry a previous evaluation by entering the option number at the Debugger prompt. You can also simply abort the current evaluation and return to the Lisp top level by selecting option5 or by entering the command:a:t. The following example exits the Debugger by assigning a valid value to the variable*favorite-ice-cream* and then evaluating the variable again:
->->-> (setq *favorite-ice-cream* 'chocolate) CHOCOLATE ->->-> 4 Try evaluating *FAVORITE-ICE-CREAM* again CHOCOLATENote that at the top level, the variable> *favorite-ice-cream* CHOCOLATE >
*favorite-ice-cream* is now globally bound.

Generated with Harlequin WebMaker