Solved

Debug Checking

Posted on 2004-08-13
2
223 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 69

Accepted Solution

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

Author Comment

by:gvector1
Comment Utility
Thanks a million,
Kendal
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now