unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Christopher Howard <christopher@librehacker.com>
To: Guile User <guile-user@gnu.org>
Subject: Interactive Debugging
Date: Thu, 17 Oct 2019 20:37:23 -0800	[thread overview]
Message-ID: <1571373443.24401.2.camel@librehacker.com> (raw)

Hi, it seems like with the flexibility of Guile, I should be able to do
something like this:
```(define (foo)  (let ((a 1)        (b 2)        (c 3))    (jump-into-
debugging-repl)))```
And have access to a, b, and c and their values. But I'm not quite
figuring out how to this.
I know from 6.26.3.2 that it possible to throw an error and capture the
error stack, but I don't know how you turn that error stack into a
repl, if you get what I'm trying to say.
From poking around in the source code, I found (system repl repl) and
related modules. (start-repl) does throw me into a repl, but without
debug information. start-repl has a #:debug key, but I can't figure out
what I'm suppose to pass to it.
I can do something like this, with a break:
```(define (foo)  (let ((a 1)        (b 2)        (c
3))    (bp)    (display "done!")))
(define (bp)  '())```
But I'm not sure how to get to those locals:
```scheme@(buffer cbuff)> ,break bpTrap 1: Breakpoint at #<procedure bp
()>.scheme@(guile-user)> (foo)Trap 1: Breakpoint at #<procedure bp
()>Entering a new prompt.  Type `,bt' for a backtrace or `,q' to
continue.scheme@(guile-user) [1]> ,btIn current input:    700:4  1
(foo)    703:0  0 (bp)scheme@(guile-user) [1]> ,locals  No local
variables.scheme@(guile-user) [1]> ,upIn current input:    700:4  1
(foo)scheme@(guile-user) [1]> ,locals  No local variables.```

-- 
Christopher Howard
p: +1 (907) 374-0257
w: https://librehacker.com
social feed: https://gnusocial.club/librehacker
xmpp: creationist@member.fsf.org
otr: E9685B53 01F038DD D29281C9 30FDA71E BD0095D4
gnupg: 23FD5CC5 (keys.gnupg.net)
radio: KL1TL
featured: https://u.fsf.org/user-liberation


             reply	other threads:[~2019-10-18  4:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18  4:37 Christopher Howard [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-10-18  4:39 Interactive Debugging Christopher Howard
2019-10-18 12:39 ` Matt Wette
2019-10-18 13:18   ` Thompson, David
2019-10-18 21:21     ` Mark H Weaver
2019-10-19 14:42       ` Matt Wette
2019-10-23 23:48       ` Christopher Lam
2019-10-24  9:22         ` Amirouche Boubekki
     [not found] <mailman.2435.1571402405.9712.guile-user@gnu.org>
2019-10-18 13:38 ` Christopher Howard
     [not found] <mailman.75.1571500806.2224.guile-user@gnu.org>
2019-10-19 19:04 ` Christopher Howard
2019-10-19 19:09   ` Matt Wette

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=1571373443.24401.2.camel@librehacker.com \
    --to=christopher@librehacker.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).