help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Standard Elisp debugger vs. Edebug


From: Nicolas Richard
Subject: Re: Standard Elisp debugger vs. Edebug
Date: Wed, 06 May 2015 10:38:06 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Hi Marcin,

Marcin Borkowski <mbork@mbork.pl> writes:
>                        Even then, Edebug won't show me the backtrace,

Hit 'd' when in edebug to get a backtrace. That backtrace is less
powerful than the one you get with just (debug), but at least you have
function names, which you can then decide to instrument if you like.

> I would guess that using the standard
> debugger might be easier with macro-heavy code, at least sometimes.  Am
> I right?

It depends on what you're interested in debugging. e.g. if you
instrument the (defmacro) form, edebug will show you the steps while the
macro is being expanded (as well as the result of the expansion -- but
for this you have pp-macroexpand-last-sexp and the like).

e.g. if you C-u C-M-x on this:
(defmacro yf/foo ()
  `(progn ,(+ 2 2) t))

then eval (yf/foo)

edebug will show you that it evals (+ 2 2), and that the macro expands
to (progn 4 t) (which obviously evals to `t').

> Are there any other reasons to choose the standard debugger over
> Edebug?

C-h f debugger-mode RET shows what you can do in the debugger. FWIW I
often use these :
e               debugger-eval-expression
v               debugger-toggle-locals

-- 
Nico



reply via email to

[Prev in Thread] Current Thread [Next in Thread]