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

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

RE: using the debugger


From: Drew Adams
Subject: RE: using the debugger
Date: Fri, 8 Apr 2011 11:16:47 -0700

> Just curious -- why do you prefer debug over edebug?

No good reason that I can think of.  It's what I'm used to.  That's probably the
best reason I can give, albeit a lame one.

>From time to time someone exclaims that I should try `edebug' because it is
superior.  And from time to time I do try `edebug'.  But I always go back to
`debug', for some reason.

I don't claim to be a model in this regard; it's just what I happen to use.
YMMV.

> Or perhaps a better question: Whats your debug-workflow?

What I mentioned earlier.  I use `M-x debug-on-entry' a lot.  I use variables
`debug-on-error' (most of the time) and `debug-on-quit' (sometimes), depending
on the context.

And sometimes I insert `(debug)' or `(debug nil SHOW-ME)' into source code at
specific points, in particular to bypass code I'm uninterested in (as opposed to
`debug-on-entry', which uses the function call as entry point).

And I use calls to `message', old-school style, in particular when using the
debugger heisenbergs the execution negatively.

---

FWIW, the one improvement, in particular, that I wish someone would make to the
debugger (the debugger I use) is to have an option to control what `d' does on a
macro or special form call - or to provide another key, say `s', that does what
I want.

I, and I suspect most users, typically want to use `c' when I get to a macro
call, because I don't care to drill down through the macro expansion - I trust
it most of the time.  But sometimes I don't notice in time and I hit `d'
instead.

Without such an enhancement I need to pay a little more attention, to stop
hitting `d' and hit `c' when I get to a macro call.  In particular, `dolist' and
similar are a pain because they involve two levels of macros, for `dolist' and
for `block'.

Sure, when you catch yourself already started down the rabbit hole you can hit
`c' and `d' a bit to recuperate, but the point is that you have to pay a little
attention during a part of the process that should be a no-brainer (autopilot).

I filed an enhancement request for this back in 2009:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3466,
but no one ever responded.  Maybe someone on this list will feel like submitting
a patch to improve the debugger this way. ;-)




reply via email to

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