programmatically detect whenever test run is in debug mode

if (System.Diagnostics.Debugger.IsAttached)
    // code or timeout value when running tests in debug mode
else

   // non debug mode

 

from:https://social.msdn.microsoft.com/Forums/vstudio/en-US/221c9385-e2a8-4630-b2f5-f4eabfd62df5/programmatically-detect-whenever-test-run-is-in-debug-mode?forum=vsunittest 

posted @ 2018-06-19 15:24  94cool  阅读(152)  评论(0编辑  收藏  举报