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: Fri, 23 Dec 2022 10:13:33 +1300 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000031a7f905f0712549" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33995"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 22 22:14:10 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 1p8StF-0008dn-6n for ged-emacs-devel@m.gmane-mx.org; Thu, 22 Dec 2022 22:14:09 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p8Ssz-0006nT-Vo; Thu, 22 Dec 2022 16:13:54 -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 1p8Ssy-0006nK-NS for emacs-devel@gnu.org; Thu, 22 Dec 2022 16:13:52 -0500 Original-Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p8Ssx-0008W7-73 for emacs-devel@gnu.org; Thu, 22 Dec 2022 16:13:52 -0500 Original-Received: by mail-pf1-x434.google.com with SMTP id d82so2039000pfd.11 for ; Thu, 22 Dec 2022 13:13:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=Eiw4fQrnnki0tiJR03Vc4M/4GbRSP0UR7KVM7rj6Jig=; b=BxXHcWesc9uLxJcK/R6KyO4HWR5E0Atcem8yjF7gy2VsuvKw4/Rd5DmABXnm5OmkJd 6I3QwhiQkaa3/PgRmEy5angOOyuGtMWbvuyObTxOGR2HT7gBk4B8PUcWNTNxUxWuRxY5 dojrRuOlfBhZGNZBI4jq/xIa38CL3URyLB8dDw4xjEgyT1c8ilTaaayflQ0lBsPwXwe4 t59/hVtNM2YA+4yswGvSd5DW/6NSrbzB0gQrPgXNU+tZ2Zv/ZI5XkIoJJksqu48PZ86l Ukw8n6r8hfKV3PQWyK1aelDII/RkfoN2vhDoOkMmHBaNRHHm6x0MaTNuaLfpVvftPRH0 PWKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=Eiw4fQrnnki0tiJR03Vc4M/4GbRSP0UR7KVM7rj6Jig=; b=BNe7tpOrOfmOtikTvCYL14OeXqISnOJ+Hfjwrl1DV66rE1glXv2bEVhikuPzIcfA7F P76lDorpyMdb4PIPvl0I970BiLm/zDj3RYN9dJrpNbv9hcQPzL7/8p0X4J4/VNiyhVIz RDN+80+qoBq9ocEnbvN67/Bxg3bRmOYo1xcePCalgGhAiBNkFZIDmWFZ15Bd+BQi4Luy hDXKSFl9W78SI+CfvyUOjiTb2bmUuzK/XdJvw3JOe0UqwdKC3Sb8/Go+IkAYg2/3D5SR opExUxnZ5es5+ebbv2G6bP9tlrebonqX/V3cE1YDVNDIsFiOr13UAz2FEIqdS+QAQJSp VoWQ== X-Gm-Message-State: AFqh2kriloe1Hg2bXyHczrKHm38tDUpH2Y01toLRQeINZAAINyDtThWj vDVoy3Xu6/kGz1nRDgw/1oyyIB8swkpW3ZUDpSBRaBYIcyA= X-Google-Smtp-Source: AMrXdXuDKSdmMx9f4Q4R+APBKVq/A7NUksAY2xpBd8JEXEGuHS7BffXpNDcrOIl3oA77WvG3Pk+huwYryuxkJluJyDI= X-Received: by 2002:a63:310d:0:b0:479:46cd:b5df with SMTP id x13-20020a63310d000000b0047946cdb5dfmr521130pgx.242.1671743629533; Thu, 22 Dec 2022 13:13:49 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=davin.pearson@gmail.com; helo=mail-pf1-x434.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:301801 Archived-At: --00000000000031a7f905f0712549 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I have fixed a bug in an earlier email where (foo) was called before foo was defined. When I write the following code: (progn (setq edebug-on-error t) (setq edebug-all-defs t)) (defun foo () tomcat ) (foo) How do I invoke the edebug debugger when you get an error: Symbol=E2=80=99s value as variable is void: tomcat I want the debugger to point to the offending line of code, in this case tomcat. The way that I currently find errors such as these is to put checkpoints on every second line except the last line of defuns. However this approach is rather cumbersome as I have to add a lot of checkpoints and then remove them when I find the bug. *Davin.* --00000000000031a7f905f0712549 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I have fixed a bug in an earlier email where (foo) wa= s called
before foo was defined.
<= br>When I write the following code:

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

(defun foo ()
=C2= =A0 tomcat
=C2=A0 )
(foo)

How do I invoke the edebug debugger = when you get an error:

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

I want the debugger to point to the offending line of code,in this case tomcat.

The way that I currently find errors such as t= hese is to put
checkpoints on every second line except the last line of = defuns.
However this approach is rather cumbersome as I have to add a lo= t
of checkpoints and then remove them when I find the bug.

<= div dir=3D"ltr" class=3D"gmail_signature">
Davin.


--00000000000031a7f905f0712549--