473,396 Members | 1,917 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 13463
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Robert | last post by:
Simple way of writing debug print statements in your JavaScript code. You need to have enabled popups in your browser. I liked the ability to write to the java console in Netscape 4.x. This,...
2
by: Andy Fish | last post by:
Hi, I am wanting to put some simple logging into my .net app. The basic features will be that errors get logged to a file and that there will be a configuration flag to enable more detailed...
2
by: Boba | last post by:
Hi, I'm programming a WinForm application. I would like to enter commands that will send output that will help me to locate bugs in the future. I know that there is a way to send output by...
3
by: Tim Cowan | last post by:
Hi How do I write to the immediate window in a C# web project? I want to use it for debugging. When I used VB I would write Debug.Print. What is the equivalent for C#? Thanks Tim Cowan
4
by: Laurence Nuttall | last post by:
I have opened the Immediate window, but my debug.write and debug.writeline results are nowhere to be found in the immdediate window. Does anyone know where ther results of the debug.write and...
1
by: Steven Prasil | last post by:
When I run/debug a program with Console.out.write statements inside and the program execution reaches this statement then a new console/command prompt window (this with black background) is opened...
46
by: Ian Boyd | last post by:
IIS5, on a Windows 2000 Server machine. Debeg.WriteLine "Hello, world!" How can i view it?
0
by: Oenone | last post by:
I have a VS2005 macro that runs in my BuildEvents.OnBuildDone event handler each time I build my solution. I'd like to get this macro to write to either the Output/Debug window or the Immediate...
2
by: joelkeepup | last post by:
Hi, I made a change this morning and now im getting an error that says either "a is undefined or null" or "e is undefined or null" the microsoft ajax line is below, I have no idea how to...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.