[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: How do I go about debugging my Elisp code?

From: Davin Pearson
Subject: Fwd: How do I go about debugging my Elisp code?
Date: Thu, 13 Jan 2022 14:22:34 +1300

---------- Forwarded message ---------
From: Davin Pearson <>
Date: Sat, 8 Jan 2022 at 18:20
Subject: How do I go about debugging my Elisp code?
To: emacs-devel <>

I sent this email to the google group but got no reply :-(

My problem is with the GNU Elisp Debugger...
When it comes up with a back trace it notifies you of the
problematic line of code but doesn't tell you which line or file
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 URL location for an example.
In this file debug lines are commented out like so
;;(message "#Monkey-Man:123:")

Here is my choice of syntax highlighting so that
my checkpoints appear in a dimmer face so they
don't unnecessarily clutter up the screen.

Executing the command in this file called dmp-padderise2.el:
M-x dmp-padderise--uncomment-hash-lines makes all the debug lines
visible to the Elisp system.  Executing the following command:
M-x 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]