TechnoTone Posted February 20, 2004 Posted February 20, 2004 How can I determine whether my app is running from a fully compiled runtime or from within the development environment? Is there a difference? I want some code to be skipped with it's running in the IDE. Quote TT (*_*) There are 10 types of people in this world; those that understand binary and those that don't.
*Gurus* divil Posted February 20, 2004 *Gurus* Posted February 20, 2004 System.Diagnostics.Debugger.IsAttached Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
*Gurus* Derek Stone Posted February 20, 2004 *Gurus* Posted February 20, 2004 Applications don't "run in the IDE" as they do in Visual Basic 6. They may have a debugger attached, as hinted by Tim above, but they are always compiled and run as a full-fledged process. Quote Posting Guidelines
TechnoTone Posted February 20, 2004 Author Posted February 20, 2004 Applications don't "run in the IDE" as they do in Visual Basic 6. They may have a debugger attached, as hinted by Tim above, but they are always compiled and run as a full-fledged process. Yeah - I realised it was something like that - it is running as a fully compiled EXE after all - but I figured this was the best way to ask the question and get my meaning across. Thanks to you both. Quote TT (*_*) There are 10 types of people in this world; those that understand binary and those that don't.
*Experts* mutant Posted February 21, 2004 *Experts* Posted February 21, 2004 You could also use the DEBUG constant with the compiler #if statement to see if the application is in debug mode. Im just suggesting this because the compiler conditional statements are not compiled into the actual exe so once you set up a statement like that you don't have to edit anything (like commenting out a line that checks if the compiler is attached), and the compiler will decide what to compile. #If DEBUG 'application is compiled in debug mode #End If Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.