From: Erik Naggum

Subject: Re: Debugging Lisp code in ACL/Unix

Date: 1998-2-11 22:48

* Andrew Begel
| 1. The stepper doesn't seem to be able to single step.

  the stepper evaluates each subform in turn and recursively, but if you
  compile your code, any hope of debugging each form is up, and you only
  get the only kind of form it knows about for compiled code: the whole
  function.  remember that the distance between a form and the resulting
  machine code is usually very high in Lisp, much unlike C.

| I don't get it.  I'd like to know where I am (which sexp).

  it looks more and more like you compile your code.  there are no sexps in
  compiled code.

| 3.  How does anybody debug Lisp code (without print statements) if this
| stuff doesn't work?

  well, it works, they just don't compile code whose internals need to be
  debugged.

  it's hard to tell how you get compiled functions in the first place, but
  if you use M-C-x (etc) in an Emacs buffer with Common Lisp source, you
  should consult the Emacs variable FI:LISP-EVALS-ALWAYS-COMPILE.  you can
  also get evaluation instead of compilation with C-u M-C-x, for instance,
  if you don't want to change this variable, which defaults to true.
  
#:Erik