Aids in AutoLISP debugging
(trace [function...])
trace function sets the trace flag for the specified functions. Each time a specified function is evaluated, a trace display appears showing the entry of the function (indented to the level of calling depth) and prints the result of the function.
TheIf Visual LISP is active, trace output is sent to the Visual LISP Trace window. If Visual LISP is not active, trace output goes to the AutoCAD command window.
untrace to turn off the trace flag.
UseArguments
trace has no effect.
A symbol that names a function. If no argument is supplied,Return Values
trace. If no argument is supplied, trace returns nil.
The last function name passed toExamples
foo and set the trace flag for the function:
Define a function namedCommand: (defun foo (x) (if (> x 0) (foo (1- x))))
FOO
Command: (trace foo)
FOO
foo and observe the results:
InvokeCommand: (foo 3)
Entering (FOO 3)
 Entering (FOO 2)
  Entering (FOO 1)
   Entering (FOO 0)
   Result: nil
  Result: nil
 Result: nil
Result: nil
untrace:
Clear the trace flag by invokingCommand: (untrace foo)
FOO
untrace function.
The