Redirect Console.Write... Methods to Visual Studio's Output Window While Debugging

AMissico picture AMissico · Mar 25, 2010 · Viewed 27.3k times · Source

From a Console Application project in Visual Studio, I want to redirect Console's output to the Output Window while debugging.

Answer

Alex F picture Alex F · Mar 25, 2010

Change application type to Windows before debugging. Without Console window, Console.WriteLine works like Trace.WriteLine. Don't forget to reset application back to Console type after debugging.