Solved

Debug Checking

Posted on 2004-08-13
2
249 Views
Last Modified: 2010-04-15
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
Comment
Question by:gvector1
2 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 11793887
System.Diagnostics.Debugger.IsAttached returns True when you are running from within the IDE with the debugger.
0
 

Author Comment

by:gvector1
ID: 11811171
Thanks a million,
Kendal
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

827 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question