Re: retrieving line number in case of error - "simple debugger"



Nicolas Castagne <castagne@xxxxxxx> 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.)
.