Recently I read the article by Chris Idzerda over at Vertigo software that described how to Detect Visual Studio Debugging . While the method he used was a bit of a "hacky workaround", below is a more sound way to detect it using built in .Net libraries,