Debugger : Can't see local variables when stepping
Jérôme Radix <[email protected]>
| Newsgroups | gmane.lisp.steel-bank.general |
|---|---|
| Message-ID | <CAAyNt75JoCKF8Fk9DR2imzYdRerRoypsBEof3+WfBwTGrKE1VA@mail.gmail.com> |
Hello,
When using the debugger, I can't figure out how to see the value of I and
VAR2 in my little test code, even with (debug 3) optimization setting:
(defun foo (var1)
(break)
(let ((var2 (subseq var1 0 10)))
(dotimes (i 10 (fresh-line))
(format t "~C" (char var2 i)))))
(foo "Hello World")
Here is the transcript of my session, on linux
5.15.146.1-microsoft-standard-WSL2:
$ sbcl --no-sysinit --no-userinit
This is SBCL 2.3.4, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (declaim (optimize (debug 3)))
NIL
* (sb-ext:describe-compiler-policy)
Basic qualities:
COMPILATION-SPEED = 1
DEBUG = 3
SAFETY = 1
SPACE = 1
SPEED = 1
INHIBIT-WARNINGS = 1
Dependent qualities:
SB-C::CHECK-CONSTANT-MODIFICATION = 1 -> 1 (maybe)
SB-C::TYPE-CHECK = 1 -> 3 (full)
SB-C::LET-CONVERSION = 1 -> 0 (off)
SB-C:ALIEN-FUNCALL-SAVES-FP-AND-PC = 1 -> 3 (yes)
SB-C:VERIFY-ARG-COUNT = 1 -> 3 (yes)
SB-C::INSERT-DEBUG-CATCH = 1 -> 3 (yes)
SB-C::RECOGNIZE-SELF-CALLS = 1 -> 0 (no)
SB-C::FLOAT-ACCURACY = 1 -> 3 (full)
SB-C:INSERT-STEP-CONDITIONS = 1 -> 3 (full)
SB-C::COMPUTE-DEBUG-FUN = 1 -> 3 (yes)
SB-C:STORE-SOURCE-FORM = 1 -> 3 (yes)
SB-C::PRESERVE-SINGLE-USE-DEBUG-VARIABLES = 1 -> 3 (yes)
SB-C::PRESERVE-CONSTANTS = 1 -> 0 (no)
SB-C:INSERT-ARRAY-BOUNDS-CHECKS = 1 -> 3 (yes)
SB-C::AREF-TRAPPING = 1 -> 0 (no)
SB-C::STORE-XREF-DATA = 1 -> 3 (yes)
SB-C:STORE-COVERAGE-DATA = 1 -> 0 (no)
SB-C:INSTRUMENT-CONSING = 1 -> 1 (no)
SB-C::STORE-CLOSURE-DEBUG-POINTER = 1 -> 0 (no)
* (defun foo (var1)
(break)
(let ((var2 (subseq var1 0 10)))
(dotimes (i 10 (fresh-line))
(format t "~C" (char var2 i)))))
FOO
* (foo "Hello World")
debugger invoked on a SIMPLE-CONDITION in thread
#<THREAD tid=1590 "main thread" RUNNING {1001090003}>:
break
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [CONTINUE] Return from BREAK.
1: [ABORT ] Exit debugger, returning to top level.
(FOO "Hello World")
source: (BREAK)
0] start
; Evaluating call:
; (SUBSEQ VAR1 0 10)
; With arguments:
; "Hello World"
; 0
; 10
1] step
; (SUBSEQ VAR1 0 10) => "Hello Worl"
; Evaluating call:
; (+ I 1)
; With unknown arguments
H
0] step
; Evaluating call:
; (+ I 1)
; With unknown arguments
e
0] L
VAR1 = "Hello World"
==> I want to see the value of I and VAR2. What am I doing wrong ?
I've tried several combinations of (declaim (optimize (debug 3) (space 0)
(safety 3) (speed 0))) with no difference in behavior.
Thanks for your help.
Regards,
Jérôme.
_______________________________________________
Sbcl-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sbcl-help