Solved

Debug Checking

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Keyboard 2 34
updating order of the rows, N+1 query issue, C#, asp.net, MVC, SQL Server 3 27
C# Gridview 1 33
tableview is not updating 1 10
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

803 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