-
September 19th, 2011, 02:30 PM
#1
VS2008: Detecting when running under IDE
Guys ... is there any way for me to detect whether or not my code is running under the IDE? I.E.
if (SomeNameSpace.IDE_Active())
Console.WriteLine("Code is running in the IDE!");
Thanks,
-Max
-
September 19th, 2011, 04:52 PM
#2
Re: VS2008: Detecting when running under IDE
System.Diagnostics.Debugger.IsAttached
Always use [code][/code] tags when posting code.
-
September 20th, 2011, 10:39 AM
#3
Re: VS2008: Detecting when running under IDE
I think you could also use Conditional Compilation logic here as well, something like :
Code:
#If Debug = True Then
'Code to fire WHILE debugging
#Else
'Code to fire IF NOT DEBUGGING
#End If
-
September 20th, 2011, 01:28 PM
#4
Re: VS2008: Detecting when running under IDE
Originally Posted by HanneSThEGreaT
I think you could also use Conditional Compilation logic here as well, something like :
Code:
#If Debug = True Then
'Code to fire WHILE debugging
#Else
'Code to fire IF NOT DEBUGGING
#End If
That means you are running under a debug build, but not necessarily under a debugger.
-
September 21st, 2011, 01:10 AM
#5
Re: VS2008: Detecting when running under IDE
Originally Posted by Arjay
That means you are running under a debug build, but not necessarily under a debugger.
Oops What was I thinking! LOL!
-
November 2nd, 2011, 09:21 AM
#6
Re: VS2008: Detecting when running under IDE
Thanks guys ... will check it out.
-Max
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|