[OS X Emacs] Slime+OpenMCL: debugging

Bill Clementson billclem at gmail.com
Thu Dec 11 21:30:44 EST 2008


On Thu, Dec 11, 2008 at 4:27 PM, David Reitter <david.reitter at gmail.com> wrote:
> On 11 Dec 2008, at 18:11, Bill Clementson wrote:
>
>
>> Pressing "v" when on a stack trace line should take you to the source
>> line (you may have to compile your code with (debug 2) or some such if
>> it doesn't work for you).
>
> OK, thanks, didn't know about "v".

"C-h m" or "C-h b" in the SLDB buffer will show you the available
SLIME debugger key bindings.

> However, it only works for the internal code - pressing "v" for anything in
> my own code brings up l1-boot.lisp, which I presume is the highest level
> compiled with the right options.
>
> I tried adding  (declare (optimize (debug 2))) to some interesting
> functions, which doesn't help.

Hmm, looks like it should be (debug 3) instead.

> How would I declare something for a file?

At the top of the file use "declaim":
(declaim (optimize (debug 3)))

Note that CCL may optimize code such that the actual line isn't shown
but it should get you to the right function.

>> It's preferable to use the CVS version of SLIME instead. If you have
>> any problems, you'll have trouble getting help with the 2006 version
>> of SLIME.
>
> Can you recommend a specific snapshot?  Something that has seen some
> testing?

I just use the current CVS SLIME and the latest development version of
the CL that I'm working with and rarely have issues.

> C-c C-t doesn't work as expected in the current Slime CVS, for example - it
> is bound to trace/untrace, so I don't know how to clear the buffer...

But C-c C-t is defined as a key binding in both slime mode and slime
repl mode, so why do you think C-c C-t "doesn't work as expected" if
it's bound to trace/untrace? You didn't say what buffer you wanted to
clear, but I'm assuming it's the REPL buffer. The command there is C-c
M-o.

Have you built the documentation for SLIME? It's actually quite good
and very readable. Just do "make" in the slime/doc directory and then
you can view the slime.info or slime.pdf files. Don't read the on-line
docs (on the SLIME home page) as they are terribly out-of-date.

If you're just starting out with SLIME, you might also find some of
the links from my recent post useful:
http://bc.tech.coop/blog/081209.html

Also, you would probably get better answers to slime-related questions
on the slime development list:
http://common-lisp.net/mailman/listinfo/slime-devel

Cheers,
Bill



More information about the MacOSX-Emacs mailing list