Debugger display mistake

Started by Dmi, November 03, 2005, 01:59:09 PM

Previous topic - Next topic

Dmi

Lutz!

I found following in the debugger:

I have a function with two identical function calls. In the example theese are '(+ a b). When debugger wants to point to the second fun call, it always point to the first instead. The part of debugging session below shows that:
(define (testdbg a b)
  (let (c (+ a b))
   (println c)
   #(println (+ a b))#))


[-> 3 ] s|tep n|ext c|ont q|uit > s

-----

(define (testdbg a b)
  (let (c #(+ a b)#)
   (println c)
   (println (+ a b))))


I have also a feature request:

When error/exception occured and it's unhandled, is there a way to get debugger prompt without stack reset? - so we'll be able to interactive examine variables, which values cause an error.
WBR, Dmi

Lutz

#1
(1) This is documented in the reference for 'trace', which is a shortcult for 'debug'. Avoiding this is very expensive to code, so I opted not changing this.



(2) You can interactively examine variables by just entering the symbols or expressions at the debug prompt.



Lutz



ps: how many people use 'debug/trace' on a regular basis? instead of lots of good old 'println' ;)

nigelbrown

#2
Quote from: "Lutz"
ps: how many people use 'debug/trace' on a regular basis? instead of lots of good old 'println' ;)


I couldn't claim regular use but it has got me out of a hole from time to time - it shows how you got there as well as where you are.

I should probably use it more.



Nigel

pjot

#3
I never used it. Most of my problems come from the fact that I forget some bracket somewhere, I created a small script to point out where the brackets are missing. With logical errors I use the good old "println".



Peter

PaipoJim

#4
I'm a println man myself from way back but I used the debugger today.  I was about eight levels deep in a sea of parentheses, they were balanced (though not very well as it turned out), and I couldn't figure why I was getting different runtime errors as I switched things around, until I started watching the little pound signs lining up during the trace as I stepped through the evaluations.



Which reminds me to ask:  It would be nice to have readline support *inside* the debugger.

Dmi

#5
I'm mostly a sysadmin now, so I prefer speedy scripting, oriented on results and possibilities - not on programming itself. Also often I'm interesting on uneven cases traking etc. So I'm really glad with an interactive console and found a debugger very useful.



About inspecting variables: I know that it works in debugger, but if I'm not already in trace mode, in case of unattended error, the operation stack resets and I lost all values, defined with 'let', 'dolist' etc.



Is it possible to have a mode when debugger (or error-event - like function or symply a pure console) will be invoked automatically without stack reset?

(the abiliti of latter continuation from function, next to error point will be exellent ;)
WBR, Dmi

Lutz

#6
That may be possible, I will look into it,



Lutz

Dmi

#7
Thanks
WBR, Dmi