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: How to highlight the offending line of code with edebug Date: Fri, 23 Dec 2022 10:09:09 +1300 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000007a8fd705f0711544" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14703"; 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:10:02 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 1p8SpE-0003bN-Ol for ged-emacs-devel@m.gmane-mx.org; Thu, 22 Dec 2022 22:10:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p8Sok-0005XK-CY; Thu, 22 Dec 2022 16:09:30 -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 1p8Soj-0005X4-7d for emacs-devel@gnu.org; Thu, 22 Dec 2022 16:09:29 -0500 Original-Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p8Soh-0007fm-JP for emacs-devel@gnu.org; Thu, 22 Dec 2022 16:09:28 -0500 Original-Received: by mail-pf1-x431.google.com with SMTP id 65so2040311pfx.9 for ; Thu, 22 Dec 2022 13:09:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=MX/KpQDDYpTN6R1CnRfUphufEAewDEjwpjtl6DJSmyE=; b=gygy0qgC5x9LFKHZLjGZC6ntLyb2eoVJjpui0pW+Y1vDt3cKRpfkx9Xc25i0QZ7KmT 2+2m5npFIh75rhufGF8cYLaApCxY1JBprp0gZA4T1XhEu1bM1Cns4HDc7fYSChbQul0A ttqOouuuimYZq/s5DPSCgRVQQjiHHuD8gRfVKspLXOlPBpR3dlWBVPb5osdPMOL+3XqI Ssmp75BZoO+wwYxY2F8gpjTCJtDxB1pOBa2qHQhKqqxD0nJSzNEs8lDPmA+eozavz+Og DmsyqFVucGDnvdHB7cJ8TacPRso1+bmxqH1L3rz70/loCLv4Fbnj4E3jo6yVsv4wmxSn Z7vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=MX/KpQDDYpTN6R1CnRfUphufEAewDEjwpjtl6DJSmyE=; b=C/0kzJGOQNSUXQS8zQPHoAUB0m8kK4RX9iRxMWqvFAg+pFSLZnl6Wn1v/gCtNZGUgV INFyJcqi5Q8MngjpwI0n1jaEjz328liQGsMYD4cnkmS3Hn4wcMHn1MWCt2CylW9HRh9d ap0dbtFD+s5FY/b17gHifcde7KF/lPfrkFQtgGvP4H5egPyywhn1kJ1mlP1qZfWSX+QD D7adZqbrPSa8QOOIaXBscBTBi41zeKuU9uSD+4lw131Ekq86jBpz8wZfDr1ByOEESO03 Ogk+NHBqzhlA26kk4gSyJwBG05/UvetOAcYIwZ3hyYvNMRNA5wVFUC0F7aKDg66KMYCZ /Hjw== X-Gm-Message-State: AFqh2kpwf4d5BnTMAk+QEOCwMeBDQAqxzUucuN3ufHRXS4EaSeIMNN7o dQXZ2o+xJkLssJuOYD2Q8xmN0b/pOL+dkigu4OuKBOMZ1rw= X-Google-Smtp-Source: AMrXdXsV9sv92cAlfUtScGbaW/yBuE1MOCVNo1gvybrHpTK3uEwPMmhC+k1yyOvdR+/k2otTaAwgtyZ+seZqf6k8N4I= X-Received: by 2002:a63:310d:0:b0:479:46cd:b5df with SMTP id x13-20020a63310d000000b0047946cdb5dfmr520219pgx.242.1671743365876; Thu, 22 Dec 2022 13:09:25 -0800 (PST) Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=davin.pearson@gmail.com; helo=mail-pf1-x431.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:301800 Archived-At: --0000000000007a8fd705f0711544 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable When I write the following code: (progn (setq edebug-on-error t) (setq edebug-all-defs t)) (foo) (defun foo () tomcat ) 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. --0000000000007a8fd705f0711544 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
When I write the following code:

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

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

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

Symbol=E2=80=99s value as va= riable 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 b= ug.

--0000000000007a8fd705f0711544--