write to debug window?

M

marane moll

Hello.
How do I write to the debug window in "Visual c++" in a windows application?

Thankyou
Sincerely
Marane
 
J

Jakob Bieling

How do I write to the debug window in "Visual c++" in a windows
application?

This question should belong into a newsgroup about Visual C++, since it
is no C++ Language question. But oh well, you'll know for next time, right?
;o) The answer to your question: Use OutputDebugString ("hello world\n");

hth
 
P

Phlip

How do I write to the debug window in "Visual c++" in a windows
And if you want to know how to interface this function with C++
iostreams, you might want to look at:

http://www.respower.com/~earlye/programming/19991206.001.htm

I have wrapped up a great many of my best tricks regarding the VC++ Output
Panel here:

http://www.c2.com/cgi/wiki?VisualCeePlusPlus

It includes the iostreams wrapper from here:

http://www.codeproject.com/debug/debugout.asp

That provides an implementation of #define db(x) that prints the file name,
line number, name of x and value of x to that panel, in VC++ diagnostic
format. This means you can tap <F4> to navigate to the next db() trace
statement.

My source then goes on to provide a lite test rig.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top