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 do I go about debugging my Elisp code? Date: Sat, 8 Jan 2022 18:20:47 +1300 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000c70e2605d50b44ed" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27454"; 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 Sat Jan 08 06:21:54 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 1n64As-0006yY-MP for ged-emacs-devel@m.gmane-mx.org; Sat, 08 Jan 2022 06:21:54 +0100 Original-Received: from localhost ([::1]:45684 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n64Ar-000085-4V for ged-emacs-devel@m.gmane-mx.org; Sat, 08 Jan 2022 00:21:53 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49342) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n64A6-0007tM-8D for emacs-devel@gnu.org; Sat, 08 Jan 2022 00:21:06 -0500 Original-Received: from [2a00:1450:4864:20::12b] (port=39636 helo=mail-lf1-x12b.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n64A1-0003Do-9X for emacs-devel@gnu.org; Sat, 08 Jan 2022 00:21:05 -0500 Original-Received: by mail-lf1-x12b.google.com with SMTP id bp20so23046830lfb.6 for ; Fri, 07 Jan 2022 21:21:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=uluRPuWw3rGMDze4xT2U5UvFS07YEZR4aMjL7xNmXyo=; b=mQ7zJktQ/0SM3XruR6M9mTNqvgTx28WoLLSad2v+ZkhbaYA8CtuaNPycTozWMdtj+Y P1wGzotylYMqQ6w/XO6M0DB/v3AjGkW8uNp1PKpY5mvlnFet8zHckODoxuzOsTzTWs5E rbDVXWndP6XCZgfjxU3/tR2UoGi+Cb3BO/jg7XcwSrZOOJsYj2qcPAC5zXKGxXsYCqKM QWrx3w3synFWkpQMOHYChlamjlgjsZcs6IFdi83DMrqNth2FGjnJ+JtXNzzPji8vXAYI GYLHat1vhQSYdysXDpy7VcDANvXLcml/DBFq6LdxzDF0UHwVCiKVjqGCk94PZDQB4qQ7 5k6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=uluRPuWw3rGMDze4xT2U5UvFS07YEZR4aMjL7xNmXyo=; b=ElLOUnhDBzdcaZn3BFhh6kI/W+ZrfDHhcOUeEchQ2YbfmmEKcvp+hR1nPpiBRdHUT0 mQCqxf9mHgQV4PhNygvxQVYZ6TQCrBn8ss8JOc6rxMLINCU9Nm5pOsmlyEHybM3bbQtV EYFopRuceYfYI/+nXmX65BXGn0uW3odl07yi+zG2r8O5vVFm/AWctrpHh2zOZlRqkkEe 4dbBNbZjY8TKEG7SBQc4ZEdgCcTHSuS8K5xySdiJaWK2KGtRqCFDVc3zvgxbymChrbke TgHmE82i3dC8uy5GdBJGh5nBBzS9jwXT8NlZYtsFqQRIRgSplcUIxU53h7Zp/vyYMjHN PGkg== X-Gm-Message-State: AOAM533gITJL9xJMHbXIMn3NOqDUeDb/bCXTKGAQcPOgJF2tXIKkoRef X4kHnOZLzV/4Pn56sqUtUlHelxrpt/hIszFUVaChPqL/ZII= X-Google-Smtp-Source: ABdhPJxOseG2Jj0LS2thSnbIo20kEL5lq5JNr0FqGwn7flhmhdhwZDrsEolvUNrFnuLkzVI+M9OEHmbeV7GSnkdsJDM= X-Received: by 2002:a05:6512:1287:: with SMTP id u7mr59054466lfs.159.1641619258804; Fri, 07 Jan 2022 21:20:58 -0800 (PST) X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::12b (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::12b; envelope-from=davin.pearson@gmail.com; helo=mail-lf1-x12b.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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" Xref: news.gmane.io gmane.emacs.devel:284442 Archived-At: --000000000000c70e2605d50b44ed Content-Type: text/plain; charset="UTF-8" I sent this email to gnu.emacs.help but got no reply :-( When it comes up with a back trace it notifies you of the problematic line of code but doesn't tell you which line the error comes from. What I have to do with this is to put debugger checkpoints on every second line of Elisp code. At least that gives you the location of the error message, by looking at the *Messages* buffer you can see the last checkpoint before the debugger was entered... See the file at the following location for an example. In this file debug lines are commented out like so ;;(message "#cream:[0-9]+:") http://davinpearson.nz/binaries/dmp-padderise.el Executing the command in this file called dmp-padderise.el: dmp-padderise--uncomment-hash-lines makes all the debug lines visible to the Elisp system. Executing the following command: dmp-padderise--comment-hash-lines comments out the debug lines. Is there a better way to hunt down error messages? Could someone email me a hyperlink to a superior debugging system? --000000000000c70e2605d50b44ed Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I sent this email to gnu.emacs.help but got no reply :-(
When it comes up with a back trace it notifies you of the
problema= tic line of code but doesn't tell you which line the
error comes fro= m.

What I have to do with this is to put debugger checkpoints on
= every second line of Elisp code.=C2=A0 At least that gives you the
= location of the error message, by looking at the *Messages*
= buffer you can see the last checkpoint before the debugger
was en= tered...

See the file at the following location for an example= .
In this file debug lines are commented out like so
;;(message "= ;#cream:[0-9]+:")

http://davinpearson.nz/binaries/dmp-padderise.el
Executing the command in this file called dmp-padderise.el:
dmp-padderi= se--uncomment-hash-lines makes all the debug lines
visible to the Elisp = system.=C2=A0 Executing the following command:
dmp-padderise--comment-ha= sh-lines comments out the debug lines.

Is there a better way to hunt= down error messages?

Could someone email me a hyperlink to a superi= or debugging
system?


--000000000000c70e2605d50b44ed--