Next: Reflection, Previous: Translation, Up: Top
Option interface for the debug options. Instead of using this procedure directly, use the procedures
debug-enable,debug-disable,debug-set!anddebug-options.
Call thunk with traps enabled.
Return
#tif obj is a debug object.
When an error occurs in a running program, or the program hits a breakpoint, its state at that point can be represented by a stack of all the evaluations and procedure applications that are logically in progress at that time, each of which is known as a frame. The programmer can learn more about the program's state at the point of interruption or error by inspecting the stack and its frames.
Create a new stack. If obj is
#t, the current evaluation stack is used for creating the stack frames, otherwise the frames are taken from obj (which must be either a debug object or a continuation).args should be a list containing any combination of integer, procedure and
#tvalues.These values specify various ways of cutting away uninteresting stack frames from the top and bottom of the stack that
make-stackreturns. They come in pairs like this:(inner_cut_1 outer_cut_1 inner_cut_2 outer_cut_2...).Each inner_cut_N can be
#t, an integer, or a procedure.#tmeans to cut away all frames up to but excluding the first user module frame. An integer means to cut away exactly that number of frames. A procedure means to cut away all frames up to but excluding the application frame whose procedure matches the specified one.Each outer_cut_N can be an integer or a procedure. An integer means to cut away that number of frames. A procedure means to cut away frames down to but excluding the application frame whose procedure matches the specified one.
If the outer_cut_N of the last pair is missing, it is taken as 0.
Return a stack which consists of a single frame, which is the last stack frame for obj. obj must be either a debug object or a continuation.
Return the identifier given to stack by
start-stack.
Return the length of stack.
Return the index'th frame from stack.
Display a backtrace to the output port port. stack is the stack to take the backtrace from, first specifies where in the stack to start and depth how much frames to display. Both first and depth can be
#f, which means that default values will be used.
Return the frame number of frame.
Return the previous frame of frame, or
#fif frame is the first frame in its stack.
Return the next frame of frame, or
#fif frame is the last frame in its stack.
Return the source of frame.
Return
#tif a procedure is associated with frame.
Return the procedure for frame, or
#fif no procedure is associated with frame.
Return the arguments of frame.
Return
#tif frame contains evaluated arguments.
Return
#tif frame is an overflow frame.
Return
#tif frame is a real frame.
Display a procedure application frame to the output port port. indent specifies the indentation of the output.
Unmemoize the memoized expression m.
Return the environment of the memoized expression m.
Evaluate exp on a new calling stack with identity id. If exp is interrupted during evaluation, backtraces will not display frames farther back than exp's top-level form. This macro is a way of artificially limiting backtraces and stack procedures, largely as a convenience to the user.