All Manuals > LispWorks® User Guide and Reference Manual

5 The Trace Facility

The trace facility is a debugging aid enabling you to follow the execution of particular functions. At any time there are a set of functions (and macros and methods) which are being monitored in this way. The normal behavior when a call is made to one of these functions is for the function's name, arguments and results to be printed out by the system. More generally you can specify that particular forms should be executed before or after entering a function, or that certain calls to the function should cause it to enter the main debugger. Tracing of a function continues even if the function is redefined.

The standard way of arranging for functions to be traced is to call the macro trace with the symbols of the functions (or macros or generic functions) concerned. In addition it is possible to restrict tracing to a particular method (rather than a generic function) as described in 5.4 Tracing methods. The trace facility also handles recursive and nested calls to the functions concerned.

5.1 Simple tracing

5.2 Tracing options

5.3 Example

5.4 Tracing methods

5.5 Tracing subfunctions

5.6 Trace variables

5.7 Troubleshooting tracing

LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:18