I am trying to debug a C # .NET application using System.Diagnostics.Debugger.Launch () (or, equivalently, using VS to join an existing process). For reasons that I won’t fall into, I need to call the application from Windows Explorer, and not from Visual Studio.
While almost everything is working fine, I found that the VS Output panel does not display any console messages when the debugger is connected this way (i.e. Console.WriteLine (), printf () in pinvoke'd unmanaged dlls, etc. e). If I started a debugging session from Visual Studio, all console messages will appear in the Output panel, as expected.
So the question is: how can I attach the VS debugger to an existing process, but still be able to see the console output in the VS output panel?
Edit: I tried to check "Redirect all the text of the output window to the" Immediate window "window in the VS settings; it did not matter.
source
share