Can you test for the debugger at runtime?

J

John Heitmuller.

Hi, does anybody know if you can programmatically test within a VS
2005 VB.NET Windows app to see if the application is running in the
debugger? I have some extra controls on a Windows form that display
useful info when testing the app. I've set visible to false for these
controls for the user version. If I'm running the app in the debugger
I'd like to set visible to true for these debug controls in the form
load event handler.

Thanks,
John
 
A

Armin Zingler

John Heitmuller. said:
Hi, does anybody know if you can programmatically test within a VS
2005 VB.NET Windows app to see if the application is running in the
debugger? I have some extra controls on a Windows form that display
useful info when testing the app. I've set visible to false for
these controls for the user version. If I'm running the app in the
debugger I'd like to set visible to true for these debug controls in
the form load event handler.

Debugger.IsAttached


Armin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top