unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: emacs-devel@gnu.org
Cc: Paul Pogonyshev <pogonyshev@gmail.com>
Subject: Edebug: not stopping at a function's start. Documentation amendment.
Date: Mon, 21 Sep 2015 15:49:24 +0000	[thread overview]
Message-ID: <20150921154924.GA2180@acm.fritz.box> (raw)

Hello, Emacs.

In bug #21365, Paul Pogonyshev was asking for a feature in Edebug,
whereby execution would not stop at the beginning of an instrumented
function, only at a breakpoint.  I've been wanting this for several
years, too.

It turns out that the feature is already available by setting
`edebug-initial-mode', but is disguised by obscure documentation.  This
documentation describes how the feature is implemented rather than what
the user sees and must do.

I have rewritten the pertinent paragraph in edebug.texi as follows to
fix this, and also moved the paragraph a wee bit higher up.

Any objections to me committing this?



diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi
index 9080bf7..e086be3 100644
--- a/doc/lispref/edebug.texi
+++ b/doc/lispref/edebug.texi
@@ -281,6 +281,15 @@ can still stop the program by typing @kbd{S}, or any editing command.
 In general, the execution modes earlier in the above list run the
 program more slowly or stop sooner than the modes later in the list.
 
+When you enter a new Edebug level, Edebug will normally stop at the
+first instrumented function it encounters.  If you prefer to stop only
+at a break point, or not at all (for example, when gathering coverage
+data), change the value of @code{edebug-initial-mode} from its default
+@code{step} to @code{go} or @code{Go-nonstop}, or one of its other
+values (@pxref{Edebug Options}).  Note that you may reenter the same
+Edebug level several times if, for example, an instrumented function
+is called several times from one command.
+
 While executing or tracing, you can interrupt the execution by typing
 any Edebug command.  Edebug stops the program at the next stop point and
 then executes the command you typed.  For example, typing @kbd{t} during
@@ -300,13 +309,6 @@ executing a keyboard macro outside of Edebug does not affect commands
 inside Edebug.  This is usually an advantage.  See also the
 @code{edebug-continue-kbd-macro} option in @ref{Edebug Options}.
 
-When you enter a new Edebug level, the initial execution mode comes
-from the value of the variable @code{edebug-initial-mode}
-(@pxref{Edebug Options}).  By default, this specifies step mode.  Note
-that you may reenter the same Edebug level several times if, for
-example, an instrumented function is called several times from one
-command.
-
 @defopt edebug-sit-for-seconds
 This option specifies how many seconds to wait between execution steps
 in trace mode or continue mode.  The default is 1 second.


By the way, has anybody any idea why git diff is putting source text on
the same lines as the line numbers?  (I upgraded to git-2.4.9 very
recently).

-- 
Alan Mackenzie (Nuremberg, Germany).



             reply	other threads:[~2015-09-21 15:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-21 15:49 Alan Mackenzie [this message]
2015-09-21 19:02 ` Edebug: not stopping at a function's start. Documentation amendment Paul Eggert
2015-09-22 12:50   ` Alan Mackenzie

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=20150921154924.GA2180@acm.fritz.box \
    --to=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=pogonyshev@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).