从 Visual Studio 2015 输出窗口过滤自定义消息 [英] Filter custom message from Visual Studio 2015 output window

查看:31
本文介绍了从 Visual Studio 2015 输出窗口过滤自定义消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在过去几个月的某个时候,很多消息都与

At some point in the last couple of months, a lot of message along the lines of

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 输出窗口发送垃圾邮件,从而很难找到实际的跟踪和调试消息.这些消息来自哪里,如何禁用它们?

started spamming my Visual Studio output window making it hard to find actual trace and debug messages. Where are these messages coming from, and how do I disable them?

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

To try to solve this problem, I have tried several things.

  • 大多数答案配置输出窗口中的复选框.如果我取消选中程序输出",问题消息就会消失,但我想保留的消息也会消失.
  • 我尝试创建自定义 TraceListener 并在 WriteWriteLine 方法中设置断点,希望调用堆栈会告诉我消息是从哪里生成的.我发现这些消息并非来自典型的 Diagnotics.DebugDiagnotics.Trace 方法.
  • 我尝试通过 Console.SetOut() 将控制台重定向到我可以在其中设置断点的自定义 TextWriter.再次,我找不到任何东西.
  • Most of the answers point to configuring the checkboxes in the output window. If I uncheck "Program Output" the problem messages go away, but so do the messages I want to keep.
  • I tried creating a custom TraceListener and set a breakpoint in the Write and WriteLine methods in the hopes that the call stack would tell me where the messages were being generated from. I discovered that these messages are not coming from the typical Diagnotics.Debug or Diagnotics.Trace methods.
  • I tried redirecting the console via Console.SetOut() to a custom TextWriter that I could set breakpoints within. Again, I could not find anything.

任何帮助将不胜感激.

推荐答案

正如 @Sinatr 在他的评论中很有帮助地提到的,这可能是由几种不同的系统配置引起的,我在最初的搜索过程中没有找到相关信息.特别是,可以在以下链接中找到更多信息:

As @Sinatr helpfully mentioned in his comment, this can be caused by several different system configurations which I did not find information on during my initial search. In particular, more information can be found at the following links:

在我的情况下,罪魁祸首似乎是 Application Insights 和 Stackify Prefix 的组合,如上面链接的 StackOverflow 问题中所述.

In my situation, the culprit appears to be the combination of Application Insights and Stackify Prefix as documented in the StackOverflow question linked above.

这篇关于从 Visual Studio 2015 输出窗口过滤自定义消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆