Entering debugger; type "?" for help. debug>
You can also re-enter the debugger by evaluating (debug).
The B, D, and U commands can be prefixed with a count, for example, 5 U moves up five activation records, and 10 B displays the next 10 activation records. The default for B is to display all the activations; the default count for D and U is 1.
You can set breakpoints either in program text with the break primitive or interactively at the start of a procedure with the break-entry procedure. When Larceny reaches a breakpoint during execution, the program is suspended and the debugger is entered to allow you to inspect the program.
(break)
Invokes the breakpoint handler.
(break-entry procedure)
Set a breakpoint at the start of the procedure.
(unbreak procedure ...)
(unbreak)
In the first form, remove any breakpoint set by break-entry at the start of the procedures. In the second form, remove all breakpoints set by break-entry.
(trace-entry procedure)
Set a trace point on entry to the procedure, removing any other trace points on the procedure. When the procedure is entered, information about the call is printed on the console: the name of the procedure and the actual arguments.
(trace-exit procedure)
Set a trace point on exit from the procedure, removing any other trace points on the procedure. When the procedure returns, information about the return is printed on the console: the name of the procedure and the returned values.
Note that trace-exit destroys the tail recursion properties of the instrumented procedure. Where the procedure would normally "return" by tail-calling another procedure, the instrumented procedure will call the other procedure by a non-tail call and then return, at which point the procedure name and return values will be printed. Thus use of trace-exit may destroy the space properties of the program.
(trace procedure)
Set trace points on procedure both at entry and exit.
(untrace procedure ...)
(untrace)
The first form removes any trace points from the procedures. The second form removes all untrace points.
The value of break-handler is a procedure that is called when a breakpoint or tracepoint is encountered. The procedure takes two arguments: the procedure in which the breakpoint was set, and the byte offset within the procedure's code vector of the breakpoint.