all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'rusi'" <rustompmody@gmail.com>, <help-gnu-emacs@gnu.org>
Subject: RE: using the debugger
Date: Fri, 8 Apr 2011 11:16:47 -0700	[thread overview]
Message-ID: <6AE652B6BF304B5698C54548305D22E4@us.oracle.com> (raw)
In-Reply-To: <6ce07a3c-aa8f-4492-8976-3a2a7fc3a890@i14g2000yqe.googlegroups.com>

> 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	other threads:[~2011-04-08 18:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08 11:18 using the debugger Eric Abrahamsen
2011-04-08 11:26 ` ken
2011-04-08 11:33   ` Eric Abrahamsen
2011-04-08 14:03 ` Drew Adams
2011-04-08 15:33   ` Eric Abrahamsen
     [not found] ` <mailman.10.1302271417.11168.help-gnu-emacs@gnu.org>
2011-04-08 17:30   ` rusi
2011-04-08 18:16     ` Drew Adams [this message]
2011-04-08 22:14     ` Tim X
2011-04-09  0:39       ` Perry Smith
     [not found]     ` <mailman.3.1302286616.22287.help-gnu-emacs@gnu.org>
2011-04-24  1:07       ` David Combs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6AE652B6BF304B5698C54548305D22E4@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=rustompmody@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.