469,931 Members | 2,737 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,931 developers. It's quick & easy.

write to debug window?

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

Thankyou
Sincerely
Marane
Jul 19 '05 #1
4 13190
marane moll wrote:
Hello.
How do I write to the debug window in "Visual c++" in a windows application?


OutputDebugString

--
"Codito ergo sum"
Roel Schroeven
Jul 19 '05 #2
"marane moll" <ma****@gmx.li> wrote in message
news:bf*************@news.t-online.com...
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
--
jb

(replace y with x if you want to reply by e-mail)
Jul 19 '05 #3
"Jakob Bieling" <ne*****@gmy.net> wrote in message news:<bf*************@news.t-online.com>...
"marane moll" <ma****@gmx.li> wrote in message
news:bf*************@news.t-online.com...
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


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/prog...991206.001.htm
Jul 19 '05 #4
> > > 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


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/prog...991206.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.

--
Phlip
http://www.c2.com/cgi/wiki?TestFirstUserInterfaces
Jul 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Robert | last post: by
2 posts views Thread by Andy Fish | last post: by
2 posts views Thread by Boba | last post: by
3 posts views Thread by Tim Cowan | last post: by
4 posts views Thread by Laurence Nuttall | last post: by
46 posts views Thread by Ian Boyd | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.