Olivier
Olivier

Reputation: 95

How to know that the application is launched by debugger (VisualStudio) C#

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

Upvotes: 4

Views: 107

Answers (1)

leppie
leppie

Reputation: 117220

System.Diagnostics.Debugger.IsAttached

Note: The answer is not entirely correct. :)

Upvotes: 8

Related Questions