Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Way to determine whether executing in IDE or not? [duplicate]

In C#/VB in Visual Studio 2010, is there way in the code to determine whether the program is currently running in the IDE or not?

eg. If ProgramRunningInIDE Then MessageBox.Show exc.Message
like image 941
CJ7 Avatar asked Mar 08 '13 11:03

CJ7


1 Answers

You could check if the debugger is attached with:

System.Diagnostics.Debugger.IsAttached

This essentially does the same thing.

like image 128
Morrison Cole Avatar answered Oct 04 '22 17:10

Morrison Cole