Hi Nicolas,
how about that one (taken from the wiki, don't remember where):
proc ?# {args} {
if {[info exists ::tcl_platform(debug)] && $::tcl_platform(debug)} {
uplevel 1 $args
}
}
Best regards
Ulrich
In article <87ll1fyhgm.fsf@cenderis.demon.co.uk>,
Bruce Stephens <bruce+usenet@cenderis.demon.co.uk> writes:
> Nicolas Castagne <castagne@imag.fr> writes:
>
>> gwl wrote:
>
> [...]
>
>>> man puts
>> MMhh, sorry but I don't get it.
>> Do you mean the user should use puts to build its own debug-tool ?
>
> Almost all debugging problems end up with you wanting to know the
> value of some variables in a few places, and you can find that out by
> inserting a few puts statements in the code.
>
> (It's not always true, of course, but very often that's the case: you
> speculate what the problem might be, and adding a few puts statements
> tells you whether you were right or not. And since Tcl is
> interpreted, doing that's often no slower overall than using a
> debugger would be.)
Received on Sat Oct 15 03:53:41 2005