简体   繁体   English

在调试模式下禁用跟踪 Visual Studio 2013

[英]Disable traces in debug mode visual studio 2013

I have a lot of traces in my application and it takes a long time to start in debug mode.我的应用程序中有很多痕迹,并且在调试模式下启动需要很长时间。 Is there anyway to disable tarces in visual studio 2013 ?无论如何在visual studio 2013中禁用tarces? thanks谢谢

Not sure if this is what you are looking for (I don't quite understand what traces you are trying to disable), but you can filter the messages that are shown in the output window (while in Debug mode, right click in Output window):不确定这是否是您要查找的内容(我不太明白您要禁用哪些跟踪),但您可以过滤输出窗口中显示的消息(在调试模式下,右键单击输出窗口):在此处输入图像描述

If this is not it, can you let me know more about your scenario?如果不是这样,你能告诉我更多关于你的场景吗? Do you happen to have a lot of exceptions?你碰巧有很多例外吗?

Thanks!谢谢!

If you want to如果你想

  1. Supress both Trace & Debug message from whole application then at application startup use抑制来自整个应用程序的Trace & Debug消息,然后在应用程序启动时使用

    Trace.Listeners.Clear();
  2. Supress only Trace message from whole application then in project properties page in build tab.仅抑制来自整个应用程序的Trace消息,然后在构建选项卡的项目属性页面中。 Remove TRACE symbol from conditional compilation TextBox从条件编译 TextBox 中删除TRACE符号在此处输入图像描述

  3. Use #undef TRACE or #undef DEBUG at top line in *.cs file to supress trace or debug message from that *.cs file only.*.cs文件的第一行使用#undef TRACE#undef DEBUG来抑制来自该*.cs文件的跟踪或调试消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM