[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:39:14 -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-
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: address@hidden
otr: E9685B53 01F038DD D29281C9 30FDA71E BD0095D4
gnupg: 23FD5CC5 (keys.gnupg.net)
radio: KL1TL
featured: https://u.fsf.org/user-liberation
- Interactive Debugging, Christopher Howard, 2019/10/18
- Interactive Debugging,
Christopher Howard <=
- Re: Interactive Debugging, Matt Wette, 2019/10/18
- Re: Interactive Debugging, Thompson, David, 2019/10/18
- Re: Interactive Debugging, Mark H Weaver, 2019/10/18
- Re: Interactive Debugging, Matt Wette, 2019/10/19
- Re: Interactive Debugging, Christopher Lam, 2019/10/23
- Re: Interactive Debugging, Amirouche Boubekki, 2019/10/24
Re: Interactive Debugging, Christopher Howard, 2019/10/18
Re: Interactive Debugging, Christopher Howard, 2019/10/19