Where's result of System.Diagnostics.Trace.WriteLine?

Are you debugging? Look at the "Output" Tab (View | Output, or Ctrl+Alt+O) in Visual Studio.

If it's not outputting there, you need to add a listener.

Check this documentation.


Virtually, the key feature of Trace is that the trace messages are independent from the IDE basically. Because trace messages are also available in the release build, you can also get them, when the software was already shipped and/or you have no IDE in avail. You guessed right, there is a tool, which makes you see those messages apart from VS. If you are not debugging (i.e. no debug-console allocated in VS), you can see the trace messages with the tool Debugview running in parallel instead of Windows' EventViewer. It is also possible to write trace messages to a file by editing/creating a *.config file accompanying the assembly in question, which also records the history of messages.

Tags:

.Net