How to write a debug statement in a window form application

K

Kueishiong Tu

How do I write a debug statement to output some data in
the debug window in the .net development environment
(specifically window form application) which is
equivalent to the TRACE statement in the MFC environment.
 
D

Dmitriy Lapshin [C# / .NET MVP]

System.Diagnostics.Trace.WriteLine(...)

or

System.Diagnostics.Debug.WriteLine(...)

When your program is launched from the IDE in Debug mode, you will see all
trace and debug messages in the Output window.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top