unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Davin Pearson <davin.pearson@gmail.com>
Cc: mwd@md5i.com, emacs-devel@gnu.org
Subject: Re: How to highlight the offending line of code with edebug
Date: Mon, 02 Jan 2023 13:57:22 +0200	[thread overview]
Message-ID: <837cy52lp9.fsf@gnu.org> (raw)
In-Reply-To: <CAG9ihEt4tQjwrakzqo42u40ohMtv31UMr5djkzGW8+GXEtZ-3Q@mail.gmail.com> (message from Davin Pearson on Mon, 2 Jan 2023 13:27:08 +1300)

> From: Davin Pearson <davin.pearson@gmail.com>
> Date: Mon, 2 Jan 2023 13:27:08 +1300
> Cc: mwd@md5i.com, emacs-devel@gnu.org
> 
> (progn
>   (setq edebug-eval-top-level-form t)
>   (setq edebug-all-defs t)
>   (setq edebug-all-forms t)
>   (setq edebug-on-error t))
> 
> (defun smegulator ()
>   void-variable-smeg
>   )
> 
> ;;(smegulator)
> 
> (defmacro dmp-quote (&rest rest)
>   t)
> 
> (dmp-quote
> 
> When I put the following code at the start of
> my .emacs file it executes without errors as
> it should.
> 
> However when I evaluate (smegulator) it brings
> up the following message, without a black triangle
> 
> elisp--eval-last-sexp: Symbol’s value as variable is void: void-variable-smeg
> 
> When I execute C-u C-M-x on (defun smegulator () void-variable-smeg)
> it brings up the following messages.
> 
> edebug-after: Symbol’s value as variable is void: void-variable-smeg
> 
> elisp--eval-last-sexp: Symbol’s value as variable is void: void-variable-smeg
> with a black triangle indicating we are in edebug mode.
> 
> How do I get the black triangle online in other files for debugging my code?
> 
> i.e. how do you get Emacs to do a C-u C-M-x on every defun  without doing
> it manually C-u C-M-x for every function one at a time?

According to the manual, you should do the following, in the order
shown:

  . set edebug-all-forms to a non-nil value
  . mark the region around your code
  . type "M-x eval-region RET"



  reply	other threads:[~2023-01-02 11:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-22 21:09 How to highlight the offending line of code with edebug Davin Pearson
2022-12-22 21:13 ` Davin Pearson
2022-12-23  7:20   ` Eli Zaretskii
2022-12-23  7:36     ` Michael Welsh Duggan
2022-12-23  8:39       ` Eli Zaretskii
2022-12-26  0:54         ` Davin Pearson
2022-12-26 12:29           ` Eli Zaretskii
2023-01-02  0:27             ` Davin Pearson
2023-01-02 11:57               ` Eli Zaretskii [this message]
2023-01-02 22:11                 ` Davin Pearson

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=837cy52lp9.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=davin.pearson@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=mwd@md5i.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).