gpt4 book ai didi

c# - 从 Visual Studio 2015 输出窗口过滤自定义消息

转载 作者:太空狗 更新时间:2023-10-29 18:26:31 25 4
gpt4 key购买 nike

在过去几个月的某个时间点,很多消息都是

Event 7 was called with 5 argument(s) , but it is defined with 6 paramenter(s).
Event 10 was called with 5 argument(s) , but it is defined with 6 paramenter(s).
Event 10 was called with 5 argument(s) , but it is defined with 6 paramenter(s).

开始向我的 Visual Studio 输出窗口发送垃圾邮件,导致很难找到实际的跟踪和调试消息。这些消息来自哪里,如何禁用它们?

为了尝试解决这个问题,我尝试了几种方法。

  • 大部分 answers指向配置输出窗口中的复选框。如果我取消选中“程序输出”,问题消息就会消失,但我想保留的消息也会消失。
  • 我尝试创建自定义 TraceListener 并在 WriteWriteLine 方法中设置断点,希望调用堆栈会告诉我从哪里生成消息。我发现这些消息不是来自典型的 Diagnotics.DebugDiagnotics.Trace 方法。
  • 我尝试通过 Console.SetOut() 将控制台重定向到我可以在其中设置断点的自定义 TextWriter。同样,我找不到任何东西。

如有任何帮助,我们将不胜感激。

最佳答案

作为@Sinatr在他的评论中有帮助地提到,这可能是由几种不同的系统配置引起的,我在最初的搜索中没有找到相关信息。具体而言,可以在以下链接中找到更多信息:

在我的情况下,罪魁祸首似乎是 Application Insights 和 Stackify Prefix 的组合,如 StackOverflow question linked above 中所述.

关于c# - 从 Visual Studio 2015 输出窗口过滤自定义消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42814394/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com