1

How can I redirect everything printed onto the command prompt to be printed onto the output window in Visual studio 2012? I am looking for a console as shown in eclipse.

I am developing a console application in visual C++.

I tried "using namespace System::Diagnostic" but this way I don't see any Debug.WriteLine in suggestions. What other alternative do I have?

Shaun
  • 313
  • 3
  • 9
  • 1
    what's wrong with the console window? – Cheers and hth. - Alf Dec 06 '14 at 04:41
  • Its just that I have to switch back and forth many times. That is frustrating. If there was a way to embed the command window inside Visual studio, that would also work fine for me. – Shaun Dec 06 '14 at 04:53
  • possible duplicate of [How to redirect stdout to output window from visual studio](http://stackoverflow.com/questions/5248704/how-to-redirect-stdout-to-output-window-from-visual-studio) – Tomas Kubes Dec 06 '14 at 08:20
  • possible duplicate of [Capturing cout in Visual Studio 2005 output window?](http://stackoverflow.com/questions/73286/capturing-cout-in-visual-studio-2005-output-window) – Retired Ninja Dec 06 '14 at 08:23

1 Answers1

1

This question is answered here. Anyway you should try work different approach, you may be used to Eclipse a I believe, you will get used to Visual Studio soon. I never needed to redirect the console output to Output Window.

These two types of outputs has different purposes. Console Output is intended for the application itself (customer) and one Output Window is intended for debugging purposes. You don't want to release debug messages to customer. Right? But you don't want to delete or comment out debug messages every time you release the software.

Community
  • 1
  • 1
Tomas Kubes
  • 23,880
  • 18
  • 111
  • 148