m_poorUser m_poorUser - 1 year ago 79
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.

Answer Source

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:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download