Next: Coverage Testing, Previous: Printing in Edebug, Up: Edebug [Contents][Index]
In addition to automatic stepping through source code, which is also called tracing (see Edebug Execution Modes), Edebug can produce a traditional trace listing of execution in a separate buffer, ‘*edebug-trace*’.
If the variable edebug-trace
is non-nil
, each function entry and
exit adds lines to the trace buffer. On function entry, Edebug prints
‘::::{’ followed by the function name and argument values. On
function exit, Edebug prints ‘::::}’ followed by the function name
and result of the function. The number of ‘:’s is computed from
the recursion depth. The balanced braces in the trace buffer can be
used to find the matching beginning or end of function calls. These
displays may be customized by replacing the functions
edebug-print-trace-before
and edebug-print-trace-after
,
which take an arbitrary message string to print.
The macro edebug-tracing
provides tracing similar to function
enter and exit tracing, but for arbitrary expressions. This macro
should be explicitly inserted by you around expressions you wish to
trace the execution of. The first argument is a message string
(evaluated), and the rest are expressions to evaluate. The result of
the last expression is returned.
Finally, you can insert arbitrary strings into the trace buffer with
explicit calls to edebug-trace
. The arguments of this function
are the same as for message
, but a newline is always inserted
after each string printed in this way.
edebug-tracing
and edebug-trace
insert lines in the trace
buffer even if Edebug is not active. Every time the trace buffer is
added to, the window is scrolled to show the last lines inserted.
(There may be some display problems if you use tracing along with the
evaluation list.)
Next: Coverage Testing, Previous: Printing in Edebug, Up: Edebug [Contents][Index]