unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Interactive Debugging
@ 2019-10-18  4:37 Christopher Howard
  0 siblings, 0 replies; 11+ messages in thread
From: Christopher Howard @ 2019-10-18  4:37 UTC (permalink / raw)
  To: Guile User

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


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Interactive Debugging
@ 2019-10-18  4:39 Christopher Howard
  2019-10-18 12:39 ` Matt Wette
  0 siblings, 1 reply; 11+ messages in thread
From: Christopher Howard @ 2019-10-18  4:39 UTC (permalink / raw)
  To: Guile User

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


^ permalink raw reply	[flat|nested] 11+ messages in thread
[parent not found: <mailman.2435.1571402405.9712.guile-user@gnu.org>]
[parent not found: <mailman.75.1571500806.2224.guile-user@gnu.org>]

end of thread, other threads:[~2019-10-24  9:22 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-18  4:37 Interactive Debugging Christopher Howard
  -- strict thread matches above, loose matches on Subject: below --
2019-10-18  4:39 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

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).