When you specify
gds-debug-trap as the behaviour for a trap and
the Guile program concerned hits that trap, GDS displays the stack and
the relevant Scheme source code in Emacs, allowing you to explore the
state of the program and then decide what to do next. The same
applies if the program calls
gds-debug-trap) and then throws an exception that passes through
lazy-handler-dispatch, except that in this case you can only
explore; it isn't possible to continue normal execution after an
The following commands are available in the stack buffer for exploring the state of the program.
gds-up). GDS displays stack frames with the innermost at the top, so moving “up” means selecting a more “inner” frame.
gds-down). GDS displays stack frames with the innermost at the top, so moving “down” means selecting a more “outer” frame.
gds-select-stack-frame). This is useful after clicking somewhere in the stack trace with the mouse.
Selecting a frame means that GDS will display the source code
corresponding to that frame in the adjacent window, and that
subsequent frame-sensitive commands, such as
gds-step-over (see Continuing Execution), will
refer to that frame.
gds-evaluate). The result is displayed in the echo area.
gds-frame-info). This includes what type of frame it is, the associated expression, and the frame's source location, if any.
gds-proc-source). The source code (where available) is displayed in the echo area.
gds-proc-source) is useful when the procedure being
called was created by an anonymous
(lambda ...) expression.
Such procedures appear in the stack trace as
(...)>, which doesn't give you much clue as to what will happen
next. S will show you the procedure's code, which is usually
enough for you to identify it.