[Top][All Lists]

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

Interactive Debugging

From: Christopher Howard
Subject: Interactive Debugging
Date: Thu, 17 Oct 2019 20:37:23 -0800

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-
And have access to a, b, and c and their values. But I'm not quite
figuring out how to this.
I know from 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
social feed:
xmpp: address@hidden
otr: E9685B53 01F038DD D29281C9 30FDA71E BD0095D4
gnupg: 23FD5CC5 (
radio: KL1TL

reply via email to

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