unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* How do I go about debugging my Elisp code?
@ 2022-01-08  5:20 Davin Pearson
  2022-01-10 10:11 ` Michael Heerdegen
  0 siblings, 1 reply; 4+ messages in thread
From: Davin Pearson @ 2022-01-08  5:20 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1010 bytes --]

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?

[-- Attachment #2: Type: text/html, Size: 1231 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* How do I go about debugging my Elisp code?
@ 2022-01-08  5:36 No Wayman
  0 siblings, 0 replies; 4+ messages in thread
From: No Wayman @ 2022-01-08  5:36 UTC (permalink / raw)
  To: davin.pearson; +Cc: emacs-devel


I would recommend reading over the documentation here:

https://www.gnu.org/software/emacs/manual/html_node/elisp/Debugging.html


Edebug is especially handy.

P.S. You can also access the same documentation from within Emacs 
via the info command.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How do I go about debugging my Elisp code?
  2022-01-08  5:20 Davin Pearson
@ 2022-01-10 10:11 ` Michael Heerdegen
  2022-01-10 10:37   ` Po Lu
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Heerdegen @ 2022-01-10 10:11 UTC (permalink / raw)
  To: Davin Pearson; +Cc: emacs-devel

Davin Pearson <davin.pearson@gmail.com> writes:

> I sent this email to gnu.emacs.help but got no reply :-(

I can't find your email in gmane.emacs.help.  Did it arrive?

Michael.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How do I go about debugging my Elisp code?
  2022-01-10 10:11 ` Michael Heerdegen
@ 2022-01-10 10:37   ` Po Lu
  0 siblings, 0 replies; 4+ messages in thread
From: Po Lu @ 2022-01-10 10:37 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: Davin Pearson, emacs-devel

Michael Heerdegen <michael_heerdegen@web.de> writes:

>> I sent this email to gnu.emacs.help but got no reply :-(

The Usenet bridge has been down for a while now.  You should send to
help-gnu-emacs@gnu.org instead.

> I can't find your email in gmane.emacs.help.  Did it arrive?

gmane.emacs.help archives help-gnu-emacs, and not the old gnu.emacs.help
newsgroup, I think.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-10 10:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-08  5:36 How do I go about debugging my Elisp code? No Wayman
  -- strict thread matches above, loose matches on Subject: below --
2022-01-08  5:20 Davin Pearson
2022-01-10 10:11 ` Michael Heerdegen
2022-01-10 10:37   ` Po Lu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).