Debugging of LISP Functions in ARES

ARES, Lisp, Customization, Routines, Function, Debug

Christian Kramer avatar
Written by Christian Kramer
Updated over a week ago

Since XtraTools have been included, the debugging of user LISP routines is blocked. The XtraTools contain protect lisp files, this lead to a general protection of LISP and all debugging functions don't prompt anything to the command line window anymore.

The easiest way to debug LISP in ARES Commander, you rename the C:\Program Files\Graebert GmbH\ARES Commander 2019\XtraTools\ temporarily to e.g.
C:\Program Files\Graebert GmbH\ARES Commander 2019\_XtraTools\ and restart the ARES again.

Then you get an error message at the startup:
Startup...
Loading main.lsp... OK.
Loading LoadXtraTools.lsp... Error: Folder "XtraTools" not found!

Now you can use the tracing command below to debug LISP:

(*settrace* variant [seconds])

The *settrace* function sets the mode for tracing of Lisp routines and functions.

The integer value variant may be combined (as follows):

0 No trace
1 Display allocated memory
8 Display function that caused an error
16 Display in case of an error all expressions up to function that caused the error
32 Display any Lisp expression evaluated
32+64 Display any Lisp expression evaluated (each line of code) needs to be confirmed by pressing any key
32+128 Display any Lisp expression evaluated. Halts at the end of a line for a certain time specified by the argument seconds. The default value is 5 seconds.

Note: As soon as protected Lisp files are loaded, the *settrace* function does not work (by intention). When writing your own programs or when porting you should avoid loading protected Lisp files.

Related Functions (can be found in the LISP Reference inside the Windows Program group of the ARES Commander start menu)
trace, untrace

Did this answer your question?