guix-devel
[Top][All Lists]
Advanced

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

Re: Guile debugger workgroup?


From: Ludovic Courtès
Subject: Re: Guile debugger workgroup?
Date: Mon, 28 Nov 2022 12:06:33 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Hi,

zimoun <zimon.toutoune@gmail.com> skribis:

> scheme@(guix-user)> ,break example
> Trap 2: Breakpoint at #<procedure example (a)>.
> scheme@(guix-user)> (example #t)
> $2 = 20

I get this:

--8<---------------cut here---------------start------------->8---
$ 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 "/tmp/example.scm")
;;; note: source file /tmp/example.scm
;;;       newer than compiled 
/home/ludo/.cache/guile/ccache/3.0-LE-8-4.6/tmp/example.scm.go
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /tmp/example.scm
;;; <unknown-location>: warning: possibly unused local top-level variable 
`mutate-once'
;;; <unknown-location>: warning: possibly unused local top-level variable 
`mutate-twice'
;;; <unknown-location>: warning: possibly unused local top-level variable 
`do-something-with'
;;; <unknown-location>: warning: possibly unused local top-level variable 
`example'
;;; compiled /home/ludo/.cache/guile/ccache/3.0-LE-8-4.6/tmp/example.scm.go
scheme@(guile-user)> ,break example
Trap 0: Breakpoint at #<procedure example (x)>.
scheme@(guile-user)> (example #t)
Trap 0: Breakpoint at #<procedure example (x)>
Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> ,bt
In /tmp/example.scm:
     17:0  0 (example #t)
scheme@(guile-user) [1]> ,locals
  No local variables.
--8<---------------cut here---------------end--------------->8---

and then:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user) [1]> ,q
$1 = 20
scheme@(guile-user)> ,break /tmp/example.scm 17
While executing meta-command:
Wrong number of arguments to #<procedure 7f53bf0d0288 at 
system/repl/command.scm:671:0 (repl form)>
scheme@(guile-user)> ,break-at /tmp/example.scm 17
Trap 1: Breakpoint at /tmp/example.scm:17.
scheme@(guile-user)> (example #t)
Trap 1: Breakpoint at /tmp/example.scm:17
Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> ,q
Trap 0: Breakpoint at #<procedure example (x)>
Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
--8<---------------cut here---------------end--------------->8---

Why doesn’t it work in ‘guix repl’?  Because auto-compilation is
disabled:

--8<---------------cut here---------------start------------->8---
$ head -1 $(type -P guix)
#!/gnu/store/805g934pgy3955g87ld6qixny6biwmj3-guile-wrapper/bin/guile 
--no-auto-compile
--8<---------------cut here---------------end--------------->8---

… which in turn causes ‘load’ to evaluate code.

I think we should identify scenarios where things don’t work as
expected, and then turn them into bug reports, documentation issues, or
any other concrete action we should take.

And I guess that brings us back to Maxim’s suggestion of starting a
debugger workgroup.  :-)

Ludo’.



reply via email to

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