views:

1010

answers:

1

I have noticed recently that the Visual Studio "Output window" stopped writing out my Debug.WriteLine messages in my WinForms application. It does neither output the Trace.WriteLine messages. I have also used DebugView while running this application and it shows nothing.

I am sure it worked in some VS projects some time ago - the output contained Debug messages. We also have a project that we regularly debug in production using the DebugView tool and it shows all Trace.WriteLine messages.

However, I just found out that currently in my Visual Studio, Console.WriteLine now writes to the VS Output window while the Trace and Debug.WriteLine do not.

How to control the redirections of Debug Trace and Console outputs within Visual Studio?

+1  A: 

Trace, Debug, and Console go to the Output window if you select Debug in the Show output from drop down and the Program Output option is selected (right click in output window).

AFAIK console is only redirected to output for non-console applications. Check the project properties and make sure it says either Class Library or Windows Application in the output type drop down.

Brian Rasmussen