Overview Clamps Packages CM Dictionary Clamps Dictionary Fomus
Next: Internet Resources , Previous: Debugging Tools , Up: Debugging Tools , Home: Introduction

Clamps Overview

The Sly Debugger

Common Lisp has a unique mechanism for error recovery called Condition System1. Whenever an error is encountered, emacs opens a new Buffer similar to the one shown below.

sly-debug.png
Figure 3: The Sly Debugger

It is very important to note that even though an error just occurred, the Lisp REPL is still responsive and a user can continue to work with the system. Nevertheless, the error condition should always be handled by invoking one of the restarts, listed under Restarts: to avoid multiple threads open in the background not doing anything useful.

In the above example, restart "1" or "2" are probably the most sensitive choices as retrying to divide by zero, as restart "0" suggests, would result in the same error condition as before. The restart is selected by pressing the corresponding number key on the keyboard. Aborting the debugger thread can also get accomplished using the q key.

Studying the Backtrace can convey important information about the context and sequence of function calls causing the error condition. The Sly Debugger includes a comfortable inspector to see and inspect the arguments of all functions leading to the error.

Footnotes:

1

For a detailed description see the excellent Book by Michal "phoe" Herda: The Common Lisp Condition System, Beyond Exception Handling with Control Flow Mechanisms, APress 2020