next up previous
Next: Command Summary Up: Psd for the Impatient Previous: How to Debug a

Debugger Commands

These are commands that you can give when the program has been stopped to a breakpoint, and the prompt says psd>.

val sym
gives the value of sym in the current scope.
set! sym val
sets the value of sym to val in the current scope.

c
clears all breakpoints on current line

g
continues evaluation until the next breakpoint

w
shows the current context as file name and a list of procedure names. For example, if the context is "/tmp/killme.scm:(encode encode-symbol)", it means, that the you are in file /tmp/killme.scm, inside a procedure called encode-symbol, which is inside the procedure encode.

s
steps one step in the evaluation process. Each time an expression is about to be evaluated, psd displays it and waits for a command. When an expression has been evaluated, psd displays the result and waits for a command.

n
continues evaluation until evaluation reaches a different line

r expr
evaluates expr and returns its value as the return value of the current expression

A list is taken to be a procedure call that is to be evaluated. All the essential procedures in R4RS are visible to the evaluator. Any other command displays a list of available commands.

If the debugger does not seem to be doing the right things, try the Emacs command M-x psd-reset, which will clear all the breakpoints and reset the runtime system.


next up previous
Next: Command Summary Up: Psd for the Impatient Previous: How to Debug a

Gary T. Leavens
8/19/1997