From: Andrew Begel

Subject: Debugging Lisp code in ACL/Unix

Date: 1998-2-11 21:56

I've been trying to debug some code in ACL 4.3 (under Emacs) and I'm
running into all sorts of trouble:

1. The stepper doesn't seem to be able to single step. I load in my code
and put a breakpoint in the beginning of the function that I want to step.
Then when it breaks, I try to use the :scont command and it says I'm not in
stepping mode. I also tried running (step #'myfunc) and the stepper stopped
at the first line, and then went right to the end. Isn't there
single-stepping?

2. I then tried putting (break) after every line of my function. Lisp did
do the breaks, but when I looked at the stack trace, it wouldn't tell me
more than that I was inside a let statement...

(let ((foo 'bar))
  (break)
  (+ 3 4)
  (break)
  (/ 5 6)
  (break)
  ...
) 

just told me (let ((foo #)) # # # ...) when I did the stack crawl from
inside the break point. I don't get it. I'd like to know where I am (which
sexp). Is the debugger integrated with emacs at all (ala GDB?)

3. How does anybody debug Lisp code (without print statements) if this
stuff doesn't work? Are there any extra contrib packages that help out?

Thanks,

Andy Begel
CS Dept. 
UC Berkeley