Subject: Re: Seeing printf() output under NT? - DN [1]


Jeffrey Hobbs <jeffrey.hobbs@scriptics.com> - 05 Jan 2000 - comp.lang.tcl

 Dan Maas wrote:
 > I'm trying to debug a Tk extension I'm writing...
 >
 > I really, really need to see the output of fprintf(stdout) or
 > fprintf(stderr).
 >
 > On Linux the printf's are conveniently shown on the console, but on Windows
 > I don't see anything in the Tk windowed console or a DOS box... How can I
 > see my debugging messages in real-time??

 In such cases, like when I'd debug tkTable, I actually used my
 own dprintf proc that really just did a Tcl_Eval of puts with
 the string (after formatting), allowing me to capture it in the
 console (or TkCon in my case).

 However, you can catch std channel output from wish like this
 on Windows if you pipe the program to something that writes
 to the console, like the cat32.exe program that Tk uses for
 its Tk test suite.  Just compile that (comes with the Tk
 sources, or perhaps you have a Windows cat around), and then:
     wish test.tcl | cat32.exe
 from the dos prompt.

 --
    Jeffrey Hobbs                          The Tcl Guy
    jeffrey.hobbs at scriptics.com         Scriptics Corp.

Last modified
2000-01-21

(195.108.246.50)

Note: you are looking at
the snapshot of an old wiki
- much of this information
is likely to be very outdated