Wednesday 3 August 2011

How to do a backtrace, trace, step, and more in CLISP

To do a backtrace

> :bt

To enable a trace

> (trace factorial)
> (factorial 3)

To disable a trace

> (untrace factorial)
> (factorial 3)

To enable trace indentation

> (setq *trace-indent* t)

To disable trace indentation

> (setq *trace-indent* nil)

To do stepping

> (step (factorial 3))
> :s

To display the current directory

> (cd)

To display the contents of the current directory

> (dir)

To display the load paths

> *load-paths*

To quit

> (quit)

To get out of debug

> :a

NOTES

* CLISP version 2.49

* Backtracing is not that useful

* Stepping can be tedious but it helps to illustrate what's going on in the background

* Trace is the best all rounder, especially when you enable indentation

No comments:

Post a Comment