- #Visual studio 2017 enterprise view console output how to#
- #Visual studio 2017 enterprise view console output code#
- #Visual studio 2017 enterprise view console output windows#
'WindowsFormsApp1.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\\3.1.12\'. Module is optimized and the debugger option 'Just My Code' is enabled. InitializeComponent() Debug.WriteLine("Hello Debug!") I even made a dummy application (much like what you have above) and put a Console.Writeline() right at the beginning after InitializeComponent, and the output from Debug.WriteLine() is there, but not Console.WriteLine(). This worked fine in VS 2017 (in a different application. The messages from Console.WriteLine() are not appearing.
#Visual studio 2017 enterprise view console output code#
When I changed my message from Console.WriteLine() t Debug.WriteLine(), yes, the message did appear in the Output window, so this was NOT a matter of the code not reaching that point. Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. If the answer is helpful, please click " Accept Answer" and upvote it.
#Visual studio 2017 enterprise view console output windows#
If you did the same thing like I tested but this issue remains, I suggest you start Visual Studio 2019 in Safe Mode(run devenv /SafeMode in Developer Command Prompt for VS 2019) and set the breakpoints for the “comment” and start debugging, press Step Into(F11) to see if VS hit the breakpoint and will the message in Output windows appear? I tested on my side and I noticed that the Console.WriteLine( ) did show the message in my Output window.
, Console.WriteLine() writes to Console, since the Output Window is not console, we can use System.Diagnostics class library(the Debug class or the Trace class) to send messages to the Output window.īut under certain circumstances, Console.WriteLine( ) also works and the message will appear in the Output window.
Public override void WriteLine( string value) Public override void WriteLine( object value) Public override void Write( object value) Public override void WriteLine( string format, params object arg) In start of my code: Console.SetOut( new TextHelper()) Īnd the class: public class TextHelper : TextWriter If you use Dialog -> Debugging -> Check the "Redirect All Output Window Text to the Immediate Window" you get it in the Immediate Window and pretty clean. I write TextWriter that write to Console and to Trace and replace the Console.Out with it. But I think this is not the best way.Ī simple solution that works for me, to work with console ability(ReadKey, String with Format and arg etc) and to see and save the output: On starting a child, you need to redirect stdout into parent with pipes.
#Visual studio 2017 enterprise view console output how to#
Examples for this you could find how to do this on ( Visual Studio Debug engine) Debug Engine control starting and debugging for application.