c# debugging system visual-studio C# VS2010 Determine in application whether being debugged Jan 7, 2011 See the question and my original answer on StackOverflow System.Diagnostics.Debugger.IsAttached ?