'How to view System.Diagnostics.Trace.WriteLine output in DbgView?

I have an ASP.net web-site hosted on IIS, and the code calls:

System.Diagnostics.Trace.WriteLine("test");

Reminder: You use Trace, rather than Debug, because Debug requires a debug build. Whereas Trace always works1

So on the production web-server, i run DbgView, and i don't see the OutputDebugString messages.

Why am i doing wrong?


The DefaultTraceListener already automatically outputs the messages as OutputDebugString:

By default, the Write and WriteLine methods emit the message to the Win32 OutputDebugString function and to the Debugger.Log method.

What am i doing wrong?


The DefaultTraceListener is the default trace listener. It is added by default. And by default it outputs text as OutputDebugString. For 💩 and laughter, i can try adding it again to the web.config:

    <system.diagnostics>
        <trace autoflush="false" indentsize="3">
            <listeners>
                <add name="defaultListener" type="System.Diagnostics.DefaultTraceListener" />
            </listeners>
        </trace>
    </system.diagnostics>

But it doesn't help. What am i doing wrong?


I'm running DebugView as an administrator.

I also turned in Capture Global, because some cargo-cult programming says that helps:

enter image description here

But it doesn't help. What am i doing wrong?

Bonus Reading


1Doesn't work



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source