* jump-to-debugger (like Python's pdb.set_trace)
@ 2022-03-13 20:47 Matt Wette
2022-03-14 3:36 ` Tim Meehan
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Matt Wette @ 2022-03-13 20:47 UTC (permalink / raw)
To: Guile User
Hi All,
I've put my "jump to debugger" code on github:
https://github.com/mwette/guile-jtd
jump-to-debugger is a procedure that, when called,
stops execution and fires up a REPL. It is much like
Python's pdb.set_trace() function.
Matt
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: jump-to-debugger (like Python's pdb.set_trace)
2022-03-13 20:47 jump-to-debugger (like Python's pdb.set_trace) Matt Wette
@ 2022-03-14 3:36 ` Tim Meehan
2022-03-15 3:03 ` Maxim Cournoyer
2022-03-19 19:16 ` Matt Wette
2 siblings, 0 replies; 4+ messages in thread
From: Tim Meehan @ 2022-03-14 3:36 UTC (permalink / raw)
Cc: Guile User
Thanks! I can't wait to try it out!
On Sun, Mar 13, 2022 at 3:48 PM Matt Wette <matt.wette@gmail.com> wrote:
> Hi All,
>
> I've put my "jump to debugger" code on github:
> https://github.com/mwette/guile-jtd
>
> jump-to-debugger is a procedure that, when called,
> stops execution and fires up a REPL. It is much like
> Python's pdb.set_trace() function.
>
> Matt
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: jump-to-debugger (like Python's pdb.set_trace)
2022-03-13 20:47 jump-to-debugger (like Python's pdb.set_trace) Matt Wette
2022-03-14 3:36 ` Tim Meehan
@ 2022-03-15 3:03 ` Maxim Cournoyer
2022-03-19 19:16 ` Matt Wette
2 siblings, 0 replies; 4+ messages in thread
From: Maxim Cournoyer @ 2022-03-15 3:03 UTC (permalink / raw)
To: Matt Wette; +Cc: Guile User
Hi Matt,
Matt Wette <matt.wette@gmail.com> writes:
> Hi All,
>
> I've put my "jump to debugger" code on github:
> https://github.com/mwette/guile-jtd
>
> jump-to-debugger is a procedure that, when called,
> stops execution and fires up a REPL. It is much like
> Python's pdb.set_trace() function.
I've yet to try it, but I just wanted tip in and say thank you, as this
is something that I had been missing.
I hope you get to refine it and contribute it for inclusion into Guile
proper :-).
Thanks again,
Maxim
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: jump-to-debugger (like Python's pdb.set_trace)
2022-03-13 20:47 jump-to-debugger (like Python's pdb.set_trace) Matt Wette
2022-03-14 3:36 ` Tim Meehan
2022-03-15 3:03 ` Maxim Cournoyer
@ 2022-03-19 19:16 ` Matt Wette
2 siblings, 0 replies; 4+ messages in thread
From: Matt Wette @ 2022-03-19 19:16 UTC (permalink / raw)
To: guile-user
On 3/13/22 1:47 PM, Matt Wette wrote:
> Hi All,
>
> I've put my "jump to debugger" code on github:
> https://github.com/mwette/guile-jtd
>
> jump-to-debugger is a procedure that, when called,
> stops execution and fires up a REPL. It is much like
> Python's pdb.set_trace() function.
>
Hi All,
I've pushed version v220319a to my github repo.
1) Now requires --debug flag to script session:
on-the-fly switching to debug vm is not reliable
2) added ,set-local! command
3) misc cleanup
Also, I believe I found the bug that was making line stepping swing back.
In guile-3.0.8, I changed line 913 of language/tree-il/compile-bytecode.scm
from
(maybe-emit-source src)
to
;;(maybe-emit-source src)
That is, comment the line out.
Remember, this is all still experimental.
Regards,
Matt
mwette$ guile
GNU Guile 3.0.8
Copyright (C) 1995-2021 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.
Enter `,help' for help.
scheme@(guile-user)> (load "foo.scm")
scheme@(guile-user)> (foo)
foo.scm: line 7
(if (< c 4)
* (jump-to-debugger))
(simple-format #t "foo a= ~S\n" (*a*))
scheme@(guile-user) [1]> ,next-line
foo.scm: line 8
(jump-to-debugger))
* (simple-format #t "foo a= ~S\n" (*a*))
(simple-format #t "foo b= ~S\n" b)
scheme@(guile-user) [1]> ,locals
Local variables:
$1 = closure = #<procedure foo args>
$2 = args = ()
$3 = b = 1
$4 = c = 3
scheme@(guile-user) [1]> ,set-local! b 2
Setting b from 1 to 2
scheme@(guile-user) [1]> ,locals
Local variables:
$5 = closure = #<procedure foo args>
$6 = args = ()
$7 = b = 2
$8 = c = 3
scheme@(guile-user) [1]> ,next-line
foo a= 0
foo.scm: line 9
(simple-format #t "foo a= ~S\n" (*a*))
* (simple-format #t "foo b= ~S\n" b)
(simple-format #t "foo c= ~S\n" c)))
scheme@(guile-user) [1]> ,next-line
foo b= 2
foo.scm: line 10
(simple-format #t "foo b= ~S\n" b)
* (simple-format #t "foo c= ~S\n" c)))
#<eof>
scheme@(guile-user) [1]> ,q
foo c= 3
scheme@(guile-user)>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-03-19 19:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-13 20:47 jump-to-debugger (like Python's pdb.set_trace) Matt Wette
2022-03-14 3:36 ` Tim Meehan
2022-03-15 3:03 ` Maxim Cournoyer
2022-03-19 19:16 ` 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).