m_poorUser m_poorUser - 5 months ago 44
C# Question

Writing to output window of Visual Studio?

I am new to C#. I am trying to write a message to output window for debugging purposes. I searched for a function like java's

. Tried
. It does not give an error but not print anything too.

"Define DEBUG constant" and "Define TRACE constant" options are checked.

Tools > Options > Debugging > "Redirect all Output Window text to the Immediate Window" option is not checked.

Configuration: Active (Debug)

Note: I created project with wizard as "Windows Forms Application" if relevant. I have no idea where to look.


Add the System.Diagnostics namespace then you can use Debug.WriteLine() to quickly print a message to the output window of the IDE. For more details please refer to these links: