[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

MS VC++ 6.0: Output window instead of DOS prompt console?

Posted on 1999-11-14
12
Medium Priority
?
256 Views
Last Modified: 2010-04-01
Is it possible to configure the editor to use the "Output window" at the bottom of the screen instead of the DOS prompt window (console applications) for program output while debugging?
0
Comment
Question by:boomerang061797
  • 6
  • 6
12 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 200 total points
ID: 2206339
"configure the editor "?   Do you mean program?

You can output information to the output window using the OutputDebugString() procedure.  

Let me know if you have any questions.
0
 

Author Comment

by:boomerang061797
ID: 2206380
Actually I mean configure. With this I mean that I wish the program output to be produced in the output window. The OutputDebugString() will probably work too. Could you give an example (#includes, etc.)
0
 
LVL 22

Expert Comment

by:nietod
ID: 2206391
There is nothing special to be done.  Just include windows.h as you would in any windows program.   Then just pass a string to the procedure, like

OutputDebugString("Appears in output window")'

You can place newline characters (\n) inside the string to force a line break.  
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 

Author Comment

by:boomerang061797
ID: 2206427
Actually I mean configure. With this I mean that I wish the program output to be produced in the output window. The OutputDebugString() will probably work too. Could you give an example (#includes, etc.)
0
 

Author Comment

by:boomerang061797
ID: 2206445
It works, but the text is written to the same panel as the Compiler/Linker uses. Is there a way to open a dedicated panel like the Profile, Compiler/Linker, Find in files, SQL Debugging etc use.

What is the Results panel used for?
0
 
LVL 22

Expert Comment

by:nietod
ID: 2206510
>> Is there a way to open a dedicated panel l
No.  Or at least I really doubt it.  It is possible to create add-ins for vissual studio that can add panes to the window, but I don't think there would be a way to redirect the debug information to a different pane.

Results panel used for?
It displays database querry results, maybe other things.
0
 

Author Comment

by:boomerang061797
ID: 2206539
I've been trying it out and it seems like a handy feature. The only thing I don't understand is why (when in debugging mode) the output is written to the Debug panel when I step through the program, but not when I run the program in debugging mode.

My code is:

#ifdef _DEBUG
  OutputDebugString("Debugging string\n");
#endif

Surly the _DEBUG is defined when the program is compiled in debug mode so why no output when not stepping.
0
 
LVL 22

Expert Comment

by:nietod
ID: 2206585
Are you sure it isn't being written?  When the program ends, a lot of stuff gets written to that window.  So it is possible that your messages have scrolled up off the top of the window.  

(I use this to trace progress through my program and definitely see the messages even when not single-stepping..)
0
 

Author Comment

by:boomerang061797
ID: 2206718
No my window is always blank until I step the program.
0
 
LVL 22

Expert Comment

by:nietod
ID: 2206776
Do you have another debugger on that system?  like maybe a hardware debugger like periscope or soft-ice?
0
 

Author Comment

by:boomerang061797
ID: 2207353
No, just the standard Enterprise setup on a local machine.
0
 
LVL 22

Expert Comment

by:nietod
ID: 2207960
I don't understand that.  It works for me.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

590 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question