Previous: Function Tracing, Up: Debugger

### 5.10 Single Stepping

SBCL includes an instrumentation based single-stepper for compiled code, that can be invoked via the `step` macro, or from within the debugger. See Debugger Policy Control, for details on enabling stepping for compiled code.

The following debugger commands are used for controlling single stepping.

— Debugger Command: start

> Selects the `continue` restart if one exists and starts single stepping. None of the other single stepping commands can be used before stepping has been started either by using `start` or by using the standard `step` macro.

— Debugger Command: step

> Steps into the current form. Stepping will be resumed when the next form that has been compiled with stepper instrumentation is evaluated.

— Debugger Command: next

> Steps over the current form. Stepping will be disabled until evaluation of the form is complete.

— Debugger Command: out

> Steps out of the current frame. Stepping will be disabled until the topmost stack frame that had been stepped into returns.

— Debugger Command: stop

> Stops the single stepper and resumes normal execution.

— Macro: cl:step form

> The form is evaluated with single stepping enabled. Function calls outside the lexical scope of the form can be stepped into only if the functions in question have been compiled with sufficient `debug` policy to be at least partially steppable.