How to detect that my application is running in vs2008 with debugger attached?
Previously I was doing a lot of WinFroms components and we had something InDesigner I'm wondering if there is something similar IsWithDebugg开发者_开发问答erAttached
Thanks
You could investigate System.Diagnostics.Debugger.IsAttached. This will tell you whether or not a debugger is attached to your application. Whether or not it's Visual Studio is another story.
From the the System.Diagnostics
namespace, use the Debugger.IsAttached
property.
精彩评论