0

我有一个托管在 IIS 上的 ASP.net 网站,代码调用:

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

提醒:您使用Trace而不是Debug,因为Debug需要调试版本。而Trace始终有效1

所以在生产网络服务器上,我运行DbgView,我没有看到 OutputDebugString 消息。

为什么我做错了?


DefaultTraceListener已经自动将消息输出为OutputDebugString

默认情况下,WriteWriteLine方法将消息发送到 Win32 OutputDebugString函数和Debugger.Log方法。

我究竟做错了什么?


DefaultTraceListener是默认的跟踪侦听器。它是默认添加的。默认情况下,它将文本输出为OutputDebugString。对于和笑声,我可以尝试再次将其添加到web.config

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

但这无济于事。我究竟做错了什么?


我以管理员身份运行DebugView 。

我还上交了Capture Global,因为一些货物崇拜程序说这有帮助:

在此处输入图像描述

但这无济于事。我究竟做错了什么?

奖金阅读


1不工作

4

0 回答 0