unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: "Aleix Conchillo Flaqué" <aconchillo@gmail.com>
To: Fredrik Salomonsson <plattfot@posteo.net>
Cc: guile-user <guile-user@gnu.org>
Subject: Re: How do people debug their guile code?
Date: Tue, 8 Sep 2020 14:52:07 -0700	[thread overview]
Message-ID: <CA+XASoXaBffdYe+RAUBYoBey4xRuqA1u2JCyxvOO22sjNTuB+A@mail.gmail.com> (raw)
In-Reply-To: <877dt4kvw2.fsf@posteo.net>

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


      parent reply	other threads:[~2020-09-08 21:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-08 17:42 How do people debug their guile code? Fredrik Salomonsson
2020-09-08 20:15 ` Zelphir Kaltstahl
2020-09-08 22:12   ` Fredrik Salomonsson
2020-09-08 20:48 ` Jeremy Korwin-Zmijowski
2020-09-08 21:52 ` Aleix Conchillo Flaqué [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+XASoXaBffdYe+RAUBYoBey4xRuqA1u2JCyxvOO22sjNTuB+A@mail.gmail.com \
    --to=aconchillo@gmail.com \
    --cc=guile-user@gnu.org \
    --cc=plattfot@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).