Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm Sender: cygwin-owner@sourceware.cygnus.com Delivered-To: mailing list cygwin@sourceware.cygnus.com Message-Id: <199907090647.BAA29870@mercury.xraylith.wisc.edu> To: lg@kt.dtu.dk cc: cygwin@sourceware.cygnus.com Subject: Re: Windows TRACE message In-Reply-To: Your message of "Fri, 09 Jul 1999 08:29:40 -0100." <5E4B066590@popeye.kt.dtu.dk> Date: Fri, 09 Jul 1999 01:47:41 -0500 From: Mumit Khan "Lars Gregersen" writes: > > I prefer to use the API function OutputDebugString. It isn't as > powerful as the printf type of commands, but it sends a string to a > seperate debug window. This also has the great effect that I'f you're > testing multiple programmes at the same time you get the output in > order in the same window. It works for GUI and console programmes. > > You can get a debug string viewer (for free) at www.sysinternals.com > Lars, Thanks for the very useful pointer. I tend to use a debugging stream (most of my code is C++) that has a subclass for win32 that opens a scrolled window and just dumps everything there. Very simple, and you can use iostream style formatting. debugout << __FILE__ << ": " __LINE << ": " << "error message here ...." << endl; The default class simply dumps to cerr. One of these days I'll clean up the copyright and release it. it's part of a commercial package, but since I own it, I can probably convince our commercial arm to make it freely available. The trick is to make sure that the global constructor for the debug stream is initialized before anything else, but right after iostreams is initialized. Regards, Mumit -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe@sourceware.cygnus.com