简体   繁体   中英

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 ? 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.Listeners.Clear();
  2. Supress only Trace message from whole application then in project properties page in build tab. Remove TRACE symbol from conditional compilation TextBox在此处输入图像描述

  3. Use #undef TRACE or #undef DEBUG at top line in *.cs file to supress trace or debug message from that *.cs file only.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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