From: Tim Meehan <btmeehan@gmail.com>
Cc: guile-user@gnu.org
Subject: Re: Python's pdb module
Date: Fri, 30 Apr 2021 22:00:16 -0500 [thread overview]
Message-ID: <FA5137F4-2F3B-4FED-BCAC-532A6F2995D2@gmail.com> (raw)
In-Reply-To: <7d007d00-23a7-c10f-c888-b4b07ea67ce6@gmail.com>
Thanks for the ideas folks!
> On Apr 30, 2021, at 08:24, Matt Wette <matt.wette@gmail.com> wrote:
>
>
>> On 4/29/21 8:26 PM, Tim Meehan wrote:
>> Is there something in Guile that is similar to Python's "pdb" module?
>> For instance, sometimes I find it helpful to pause right before something
>> bad happens with:
>>
>> #!/usr/bin/env python3
>> import pdb; pdb.set_trace()
>> some_function_that_is_going_to_fail_miserably()
>
> I started on something years ago but never got it working as nice as python,
> as the guile debugger still needs some help to get there. Try this snippet.
>
> (define-syntax-rule (jump-to-debugger)
> (if (eqv? 'regular (vm-engine))
> (give-warning)
> (start-repl
> #:debug (make-debug (stack->vector (make-stack #t)) 0 "trap!" #t))))
>
> You'll need some of this mess to resolve procedures:
>
> (use-modules (system repl repl))
> (use-modules (system repl debug))
> (use-modules (system repl common))
> (use-modules (system repl command))
> (use-modules (system vm frame))
> (use-modules (system vm vm))
> (use-modules (ice-9 control))
> (use-modules (ice-9 rdelim))
> (use-modules (ice-9 pretty-print))
> (use-modules (system base compile))
>
> Matt
>
>
prev parent reply other threads:[~2021-05-01 3:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-30 3:26 Python's pdb module Tim Meehan
2021-04-30 11:42 ` Ricardo G. Herdt
2021-04-30 13:20 ` Matt Wette
2021-05-01 3:00 ` Tim Meehan [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=FA5137F4-2F3B-4FED-BCAC-532A6F2995D2@gmail.com \
--to=btmeehan@gmail.com \
--cc=guile-user@gnu.org \
/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).