Scheme 48 Manual | Contents | In Chapter: Command processor
Previous: Module commands | Next: Switches

Debugging commands

Somewhat like a backtrace, but because of tail recursion you see less than you might in debuggers for some other languages. The stack to display is chosen as follows:
  1. If the current focus object is a continuation or a thread, then that continuation or thread's stack is displayed.
  2. Otherwise, if the current command level was initiated because of a breakpoint in the next level down, then the stack at that breakpoint is displayed.
  3. Otherwise, there is no stack to display and a message is printed to that effect.
One line is printed out for each continuation on the chosen stack, going from top to bottom.
,run exp
Evaluate exp, printing the result(s) and making them (or a list of them, if exp returns multiple results) the new focus object. The ,run command is useful when writing command programs.
,trace name ...
Start tracing calls to the named procedure or procedures. With no arguments, displays all procedures currently traced. This affects the binding of name, not the behavior of the procedure that is its current value. Name is redefined to be a procedure that prints a message, calls the original value of name, prints another message, and finally passes along the value(s) returned by the original procedure.
,untrace name ...
Stop tracing calls to the named procedure or procedures. With no argument, stop tracing all calls to all procedures.
The ,condition command displays the condition object describing the error or interrupt that initiated the current command level. The condition object becomes the current focus value. This is particularly useful in conjunction with the inspector. For example, if a procedure is passed the wrong number of arguments, do ,condition followed by ,inspect to inspect the procedure and its arguments.
,bound? name
Display the binding of name, if there is one, and otherwise prints `Not bound'.
,expand form
,expand-all form
Show macro expansion of form, if any. ,expand performs a single macro expansion while ,expand-all fully expands all macros in form.
,where procedure
Display name of file containing procedure's source code.

Previous: Module commands | Next: Switches