[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to highlight the offending line of code with edebug
From: |
Eli Zaretskii |
Subject: |
Re: How to highlight the offending line of code with edebug |
Date: |
Mon, 02 Jan 2023 13:57:22 +0200 |
> 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"