Eric Schulte <[email protected]> wrote:
> Hi S=C3=A9bastien,
>
> S=C3=A9bastien Vauban <[email protected]> writes:
>
> [...]
> >
> > Just for my information (maybe being able to be more accurate next time, =
> or
> > even finding a solution myself), how do you debug such a problem?
> >
> > With which debugger, with tracing/stepping? With stack trace?
> >
>
> I'm almost embarrassed to admit that I do most of my elisp debugging
> with the `message' function. I embed `message' debug statements to
> print the values of key variables at key points, and I run through
> problems looking at the output.
>
> I'd be interested to hear if anyone can recommend a better elisp
> debugging solution.
>
There are two methods that I use that I think are much more effective
than sprinkling message calls all over the place:
o edebug-defun: (in emacs-lisp mode, C-u C-M-x) will mark the
function so that when it is called, the interpreter stops and you can then
single-step through it with <SPACE>. At each point, you can
press "e" and evaluate variables (actually arbitrary expressions).
o Insert a strategically placed (debug) call and then call the function.
If/when the debug call is executed, you are dropped into the debugger
and you can then evaluate arbitrary expressions.
HTH,
Nick
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-orgmode