back

by deepaksurti·11y ago·view on hn ↗
I too miss trace a lot. Whenever I have worked on a common lisp project, trace has helped a ton to understand the application design, either for a new feature addition or a bug fix. Just knowing the starting function and tracing the package that it belongs to gets me going.

And using the Output Data View if I am using LW IDE is even more fun. [1]

trace also I think serves as a nice documentation if the functions are well documented in code, in that the output of trace to me reads like a doc!

[1] http://www.lispworks.com/documentation/lw70/IDE-M/html/ide-m...

1 comments
I'm learning CL and whetting my appetite debugging a sizeable project with SBCL/SLIME. When I trace a certain method the system goes nuts because it reports on _all_ methods of that name and they are called a lot. What I want is to trace just the method of my request and nothing more.

Instead I get flooded with useless information. Any recommendation?

In LispWorks, tracing method is possible [1], don't know how to do that with SBCL. Trace is implementation specific, so you have to check SBCL manual to trace methods.

See this gist for LW here: https://gist.github.com/dmsurti/8364dcd636829eaf83d1

You could also tailor trace with options as listed here. [2]

[1] http://www.lispworks.com/documentation/lw70/LW/html/lw-29.ht... [2] http://www.lispworks.com/documentation/lw70/LW/html/lw-27.ht...

For a starting point, see http://netzhansa.blogspot.no/2012/02/traces-of-awesomeness.h... , where Hans Hübner teaches how to do dynamically selective tracing with SBCL.
With CLOS, I'd consider adding a specific :around method for tracing a particular specialized method.
do you mean to add an :around method on the one I'm interested and trace that instead?
I really meant more like a wrapper printing the trace-in before (call-next-method) and trace-out after. A bit cumbersome though.