:trace

Top-level Command

Arguments: &rest function-or-option-list

When called with no arguments, all the functions currently being traced are printed, otherwise the arguments to :trace are function names (symbols) or option lists. An option list starts with a function name, and the other elements of the list are options for tracing that particular function. The options for one function do not affect the tracing of any other function. The options come in pairs, the first element of the pair being the option name (i.e., a keyword), and the second part being the option value. Missing options default to nil. Here are some valid calls to :trace:

:trace foo
:trace foo (bar :break-before t) baz
:trace (baz :inside foo :break-before t)
:trace 

Note that the following is invalid:

:trace foo :inside bar 

You must enclose options in a list along with the function name and the option value. If you enter the invalid case above, Lisp will complain that :inside does not have a function definition.

The minimal abbreviation of :trace is :tr.

See top-level.htm for more information on top-level commands. See debugging.htm for information on the debugger and examples of tracing.

valid options to :trace

OptionArgumentsNotes
:conditionexprTrace this function if expr evaluates to a non-nil value.
:break-beforevalThe expression val is evaluated just before entering a function, just after exiting a function, and at both times, respectively. If val evaluates to t, then a new break level is entered. Otherwise, execution continues. When used in combination with :inside, breaks only occur when the :inside condition is satisfied.
:break-after
:break-all
:inside funcTrace this function if Lisp is currently inside the evaluation of the function func. func may also be a list of functions. For example,

(trace (deeper :inside deep))

would trace the function deeper only when called from within a call to deep.

:print-beforeexprexpr should either be a single object or a list of objects which will be evaluated. The results will be printed before entering or after leaving the function, or both, in the case of :print-all>.
:print-after
:print-all

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.