All Manuals > LispWorks IDE User Guide > 25 The Stepper

25.4 Stepper controls

The Debug > Stepper menu offers fine control over the next step.

It also includes commands for setting breakpoints, displaying the source code, macro expansion, and aborting from the current step.

All these commands are also available on the Stepper toolbar as shown in The Stepper controls.

The Stepper controls

The Stepper controls operate as described below. Recall that the current position is always highlighted in orange:

Step

Steps once, remaining inside the current form. At the start of the current form, this steps the first inner form. At a function call, it steps to the value. At the form value, it steps the next form or value.

Step Through Call

Steps once. This is the same as Step above, except that at a function call, it steps that function if the source is known.

Step To Call

At the start of a form, steps to the function call of that form after evaluation of the arguments. At a function call or at the end of a form, steps to the function call of the enclosing form.

Step To Value

At the start or function call of a form, steps to the value of that form. At the end of a form, steps to the value of the enclosing form.

Next

Steps to the start of the next form, or behaves like Step if there is no next form.

Step To End

Steps to the value of the current function.

Step To Cursor

Steps to the cursor position, or displays a message if that position is not steppable.

Continue

Runs the code until a breakpoint is reached.

Breakpoint

Sets a breakpoint at the position of the cursor if there is no breakpoint there already and the position is steppable. If there is a breakpoint under the cursor, this command removes it. Note that breakpoints are highlighted red, though the orange highlight on the current stepping position overrides any breakpoint highlight..

Show Current Source

Moves the editor buffer in the source area so that the definition at the top of the backtrace area, and the active form within it, is visible.

Macroexpand

Macroexpands the form under the cursor.

Undo Macroexpand

Collapses the macro expansion under the cursor.

Abort

Aborts the execution and returns to the form which you first stepped, allowing you to repeat the execution or edit the form. This command is available only when using the Stepper in standalone mode.

Breakpoint Options

The Breakpoint Options menu allows you to set properties of a breakpoint as described in 25.6 Breakpoints.

25.4.1 Shortcut keys for the Stepper

The following Editor commands run the corresponding Stepper command in the current stepper:

Stepper Breakpoint#
Stepper Continue#
Stepper Macroexpand#
Stepper Next#
Stepper Restart#
Stepper Show Current Source#
Stepper Step#
Stepper Step Through Call#
Stepper Step To Call#
Stepper Step To Cursor#
Stepper Step To End#
Stepper Step To Value#
Stepper Undo Macroexpand

These commands can be bound to keys in the LispWorks editor, which makes those keys invoke the command in a Stepper tool. For example:

(editor:bind-key "Stepper Step" #("Control-S" "Control-s"))

Note: the editor key binding only takes effect when the input focus is in the Source or Listener panes of the Stepper tool.

For more information about Editor key bindings, see the Editor User Guide.


LispWorks IDE User Guide (Windows version) - 01 Dec 2021 19:38:09