4.2 The Tracer
traceon one or more functions. Tracing information is normally printed whenever the traced function is entered or exited. Tracing information consists of the name of the function followed at entry by its arguments and on exit by its return values. For example, the following code traces a call to the function
> (trace cdr) (CDR)If a function is already being traced,
> (cdr '(1 2 3)) 1 Enter CDR (1 2 3) 1 Exit CDR (2 3) (2 3)
tracecalls the macro
untracebefore starting the new trace. Calling
tracewith no arguments returns a list of all functions that are currently being traced.
untrace restores functions to their normal state. You can call this macro with one or more function names as arguments. Calling it with no arguments untraces all the functions currently being traced.
Forms are evaluated in the lexical environment at the time of the call to
trace. Special forms cannot be traced because they are neither functions nor macros. Calling
trace on a macro traces the macro expansion, not the evaluation of the form.
Generated with Harlequin WebMaker