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 

相关文章:

  • 2021-11-25
  • 2021-10-04
  • 2021-09-25
  • 2021-06-11
  • 2021-08-25
  • 2022-12-23
猜你喜欢
  • 2021-07-15
  • 2021-08-26
  • 2022-12-23
  • 2022-12-23
  • 2021-04-05
  • 2021-12-21
相关资源
相似解决方案