From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Davin Pearson Newsgroups: gmane.emacs.devel Subject: Re: How to highlight the offending line of code with edebug Date: Mon, 26 Dec 2022 13:54:39 +1300 Message-ID: References: <83fsd68u3f.fsf@gnu.org> <87ili2o9lc.fsf@md5i.com> <83zgbe7bu1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000006c620605f0b095ae" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16748"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Michael Welsh Duggan , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 26 01:55:39 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p9bmF-0004Bw-9u for ged-emacs-devel@m.gmane-mx.org; Mon, 26 Dec 2022 01:55:39 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p9bld-0002L5-Kp; Sun, 25 Dec 2022 19:55:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p9blc-0002Kg-F8 for emacs-devel@gnu.org; Sun, 25 Dec 2022 19:55:00 -0500 Original-Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p9bla-0003TR-B6; Sun, 25 Dec 2022 19:54:59 -0500 Original-Received: by mail-pj1-x1033.google.com with SMTP id w4-20020a17090ac98400b002186f5d7a4cso13618960pjt.0; Sun, 25 Dec 2022 16:54:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YsacxJnexfwKo58TjZ5rlFBdjRZc/D8rE5EiKVpi424=; b=Haa6D/xfLyq3M83gteqGSBc09TIj+pXJdBeww3QVV+MCAe9NKYa6jdMVz7yR3GRCZZ /NEskp/9/U+jk34HkrNZ8598VvNBcprVqcgwXpl+OzjhloQ083cZSGE6iaTGlXqkSnpU XzT4QH1vegAxlLttqxB6GhaWGAAz+MsfMfKZuyyCkfEgRS/jI0a8BCGVjrntJvek82Ll EEroySb2+FNrYABkifMS0/yNLW+0iiZIhTzGn8OuVzYZM94RUOL/8yEkyyScRV1BmdmM a011grAqOKTJr9mR+lnEneZXkKQFAM/9dX5uLTqUjTKx+rMOQGvF+uq5hyyncx858mQ4 IDeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YsacxJnexfwKo58TjZ5rlFBdjRZc/D8rE5EiKVpi424=; b=LNjkTRl3zvh8bSHYi6YgH9PeoQCI/+g+ibqdY8WYRq04EB1H/mdG9OR2au7H3jjhys BL7WMiTdohiRLZA3u+OuTPGNbtpjoW5okXJsU4kNFFEk+6+jSVveRmdsUY4ZC+Ne9Npj wRBIbRMbU5P20N59rNiCV9sh5JYW+4dT6S3xeh+EF/wxk6Dw0PGH0cE4PSd34vbYd1yL 5HChnxB6CH/3fxvr8f9KP/80OkG06epY7Uz2LB1+HtZKeVe24uOtK8E6sjZL7/ZtGfBa g+unybUw7jqsQZ8sRwHw0pQRH+Ps65nUV4Pu+cgT29S9Hqdyi8pFWifTqpuUOqbk0Dmu 5ftg== X-Gm-Message-State: AFqh2kpi/0W/FzuKlMDzAdiQWVd8ErWxIcipzvl5Uz5yriik2iJPdEQV KkFaNSv13l9pDyzc2Q1QAoQQh4H18VqXh9YaIZsMITCDvkY= X-Google-Smtp-Source: AMrXdXtm6TZo2qoLzEFFywemJQnO/nKcUahRDDO8JS4RINrsZLJozkBwcL4tI+7TV/tf98XeuybZZAsjM2AUnYReBCg= X-Received: by 2002:a17:90b:46d4:b0:21a:1d94:5691 with SMTP id jx20-20020a17090b46d400b0021a1d945691mr1662244pjb.227.1672016095370; Sun, 25 Dec 2022 16:54:55 -0800 (PST) In-Reply-To: <83zgbe7bu1.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::1033; envelope-from=davin.pearson@gmail.com; helo=mail-pj1-x1033.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:301920 Archived-At: --0000000000006c620605f0b095ae Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Consider the following code: (progn (defun foo () tomcat ) (defun bar () (foo)) ) (bar) When I instrument the foo and bar defuns for debugging by entering the command C-u M-C-x over the (progn ...) sexp and pressing the "n" key it comes with a black triangle next to tomcat, thus indicating that we are stepping through the foo function which is what I want. The error message is this: edebug-after: Symbol=E2=80=99s value as variable is void: tomcat This is all good. What I need to know is how to instrument every function for debugging. I tried the following command at the top of my ~/.emacs file: (progn (setq edebug-on-error t) (setq edebug-all-defs t)) When I put the above foo/bar/tomcat code in another file and I try to instrument the foo and bar methods for debugging, again with C-u M-C-x it comes back with the following error: bar: Symbol=E2=80=99s value as variable is void: tomcat Note that there is no black triangle next to the tomcat sexp, indicating we are using the debug module and not the edebug module, which is not what I want. How do I get every function marked as instrumented? TIA, --0000000000006c620605f0b095ae Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Consider the following code:

(progn
=C2=A0 (defu= n foo ()
=C2=A0 =C2=A0 tomcat
=C2=A0 =C2=A0 )
=C2=A0 (defun bar ()=
=C2=A0 =C2=A0 (foo))
=C2=A0 )

(bar)

When I instrument = the foo and bar defuns for debugging by
entering the command C-u M-C-x o= ver the (progn ...) sexp and
pressing the "n" key it comes wit= h a black triangle next to
tomcat, thus indicating that we are stepping = through the foo
function which is what I want.

The error message = is this:

edebug-after: Symbol=E2=80=99s value as variable is void: t= omcat

This is all good.=C2=A0 What I need to know is how to instrume= nt every
function for debugging.=C2=A0 I tried the following command at<= br>the top of my ~/.emacs file:

(progn
=C2=A0 (setq edebug-on-err= or t)
=C2=A0 (setq edebug-all-defs t))

When I put the above foo/b= ar/tomcat code in another file and I
try to instrument the foo and bar m= ethods for debugging, again
with C-u M-C-x it comes back with the follow= ing error:

bar: Symbol=E2=80=99s value as variable is void: tomcat
Note that there is no black triangle next to the tomcat sexp,
indi= cating we are using the debug module and not the edebug
module, which is= not what I want.

How do I get every function marked as instrumented= ?

TIA,

--0000000000006c620605f0b095ae--