guile-user
[Top][All Lists]
Advanced

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

Re: How do people debug their guile code?


From: Aleix Conchillo Flaqué
Subject: Re: How do people debug their guile code?
Date: Tue, 8 Sep 2020 14:52:07 -0700

Hi,

On Tue, Sep 8, 2020 at 10:43 AM Fredrik Salomonsson <plattfot@posteo.net>
wrote:

>
> Hi again,
>
> I recently asked about something similar but more Emacs specific in the
> thread "Debug setup in Emacs". But it seems there are some more work to
> be done to get it properly hooked up with Emacs' GUD. I asked a follow
> up question how people debug their code and got as suggestion that it
> might be better to create a separate thread for it.
>
> So here it is.
>
> I'm fairly new with guile (hence why I ask about this). My workflow (in
> other languages) is usually to write tests, then when something goes
> wrong I hook up a debugger and step through the code.
>
> For guile I've been just writing tests and when something goes wrong I
> sprinkle (format #t ...) and re-run the tests. I haven't dabbled that
> much in running the REPL as I haven't figured out a good way of setting
> up the same environment as when I run the tests (using guile-hall).
>
> What I gathered from the "Debug setup in Emacs" thread. Is to sprinkle
> print out statements using the "format" or "simple-format" procedure.
>
> Use the "pk" procedure.
>
> Use the REPL if the setup is easy enough, combined with the use of
> trace.
>
> And to write tests.
>
> So I'm curious if there are other workflows/steps people use/take?
>
>
>
I usually run Geiser with a REPL running and reevaluate any changes (C-c
C-k) and try again in the REPL. At the same time also use (pk) or
(display). And hopefully also run tests.

Aleix


reply via email to

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