unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Zelphir Kaltstahl <zelphirkaltstahl@posteo.de>
To: Fredrik Salomonsson <plattfot@posteo.net>
Cc: Guile User <guile-user@gnu.org>
Subject: Re: Debug setup in emacs
Date: Tue, 8 Sep 2020 08:45:15 +0200	[thread overview]
Message-ID: <c4b46773-2fe1-0f13-343f-b273dfdc3d84@posteo.de> (raw)
In-Reply-To: <CAJ98PDz336XUUpPQ5CzUNdQSjNYmhFqmkMCKQomA=GfonAOu1g@mail.gmail.com>

Hi Frederik!

I usually find myself using (display (simple-format #f "blablabla: ~a\n
some-binding)) or a custom procedure wrapping it.

At some point it becomes too much and I switch to the REPL and trying
things in there, if the setup or situation is not too hard to reproduce.

Also used (pk ...) sometimes, when I am not sure an expression is ever
evaluated.

If this fails me, I sometimes try to think about all the custom
procedures involved and start writing tests.

If I am too lazy to do that, I find myself thinking about the problem
real hard and then usually facepalming about my own silly mistakes.

If I still don't know what's going on, I might ask on the mailing list
for help.

Regards,
Zelphir

On 08.09.20 08:15, Catonano wrote:
> Hi Fredrik,
>
> Il giorno lun 7 set 2020 alle ore 22:01 Fredrik Salomonsson <
> plattfot@posteo.net> ha scritto:
>
>> Thank you for pointing this out to me and the links to the blog posts.
>>
>>
> My pleasure ☺
>
>
> And as a follup question. What do people use when debugging guile code?
>>
> I don't debug much, personally
>
> I know some people have been using the "pk" procedure
>
> It displays the arguments you pass to it in the terminal and returns the
> same arguments, untouched
>
> So you can sprinkle it all around
>
> I've had my issues with it though
>
> I never tried with (format #f) as you suggested
>
> Also, there's the "trace tool (try "(help) in the repl to read about it)
>
> This is all I know
>
> Maybe someone else can chime in, here
>
> Also, I'm wondering if this issue doesn't deserve a thread on its own 😶

-- 
repositories: https://notabug.org/ZelphirKaltstahl




  reply	other threads:[~2020-09-08  6:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-04 23:37 Debug setup in emacs Fredrik Salomonsson
2020-09-05  6:23 ` Joshua Branson via General Guile related discussions
2020-09-05  7:27 ` Jan Nieuwenhuizen
2020-09-05 22:17   ` Fredrik Salomonsson
2020-09-06  5:43     ` Jan Nieuwenhuizen
2020-09-07 19:50       ` Fredrik Salomonsson
2020-09-06  7:19 ` Catonano
2020-09-07 20:01   ` Fredrik Salomonsson
2020-09-08  6:15     ` Catonano
2020-09-08  6:45       ` Zelphir Kaltstahl [this message]
2020-09-08 17:18         ` Fredrik Salomonsson
2020-09-08 17:07       ` Fredrik Salomonsson

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=c4b46773-2fe1-0f13-343f-b273dfdc3d84@posteo.de \
    --to=zelphirkaltstahl@posteo.de \
    --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).