newLISP Fan Club

Forum => Anything else we might add? => Topic started by: Dmi on November 03, 2005, 01:59:09 PM

Title: Debugger display mistake
Post by: Dmi on November 03, 2005, 01:59:09 PM
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.
Title:
Post by: Lutz on November 04, 2005, 04:43:23 PM
(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' ;)
Title:
Post by: nigelbrown on November 04, 2005, 08:25:54 PM
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
Title:
Post by: pjot on November 05, 2005, 12:45:34 AM
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
Title:
Post by: PaipoJim on November 05, 2005, 01:15:32 AM
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.
Title:
Post by: Dmi on November 05, 2005, 08:39:57 AM
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 ;)
Title:
Post by: Lutz on November 05, 2005, 05:50:55 PM
That may be possible, I will look into it,



Lutz
Title:
Post by: Dmi on November 06, 2005, 11:52:55 AM
Thanks