• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 280
  • Last Modified:

Debug Checking

I have searched and probably overlooked the solution, but I would like to add a bit of code in my application that basically says if not running in debug mode, delete a file, else do not delete.  How can I do that, isn't there some application specific variable that will tell me that?

Thanks,
Kendal
0
gvector1
Asked:
gvector1
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
System.Diagnostics.Debugger.IsAttached returns True when you are running from within the IDE with the debugger.
0
 
gvector1Author Commented:
Thanks a million,
Kendal
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now