As stated in this answer, I know that (different than Debug), Trace can be used in both Debug and Release mode.
(In fact many answers state this and stop there so please don't mark this question as duplicate of those)
Well, I am trying it now with a simple app in visual studio (and yes the trace option is selected in properties) , and I can't see where the trace messages are going. Certainly don't go the Output window anymore.
So first the simplest and to the point question: where do the Trace messages go when in release mode?
Also,is there a way to get those messages outside visual studio? Perhaps using this (DebugView)?
You configure where the output should go to in the App.config
file.
The example below shows that the output should go to a file and console
(in case your application is a console app).
<system.diagnostics>
<trace autoflush="true" indentsize="4">
<listeners>
<add name="file" type="System.Diagnostics.TextWriterTraceListener" initializeData="c:\folder\trace.log" />
<add name="console" type="System.Diagnostics.ConsoleTraceListener" />
</listeners>
</trace>
</system.diagnostics>
When doing a
Trace.WriteLine("message");
The message
will appear at both places.
You can find more details on MSDN.