4

In my c# code I'd like to know whether the app has been launched by the debugger (in my case VisualStudio). Does anyone know how to get this information?

TIA

skaffman
  • 398,947
  • 96
  • 818
  • 769
Olivier
  • 95
  • 1
  • 11

1 Answers1

8

System.Diagnostics.Debugger.IsAttached

Note: The answer is not entirely correct. :)

leppie
  • 115,091
  • 17
  • 196
  • 297