On 11/15/2011 05:45 PM, Neil Van Dyke wrote:
David Vanderson wrote at 11/15/2011 08:33 PM:
- how to add temporary debugging statements

I usually use "log-debug" or "printf". See the documentation for how to make "log-debug" appear if you're running outside of DrRacket.


So if I have:

(if (integer? 1)
    (bar)
    (baz))

And I want to log each (bar) call, I:
- highlight "(bar)"
- Alt-OpenParen
- type: begin (printf "calling bar")

Getting:

(if (integer? 1)
    (begin (printf "calling bar") (bar))
    (baz))

And if I want to disable the printf, put "#;" in front:

(if (integer? 1)
    (begin #;(printf "calling bar") (bar))
    (baz))

Is that how you would do it?
_________________________________________________
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/users

Reply via email to