Check if application was started from within Visual Studio debug session August 13, 2023 by Tarik Try: System.Diagnostics.Debugger.IsAttached