473,385 Members | 1,934 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

debug flag at run-time?

How can I figure out at run-time if he code that runs is a debug or a
release build?

Thanks!
Nov 16 '05 #1
2 6196
Why not create your own? I don't think there's any other easier way.

#if DEBUG
internal static readonly bool debug=true;
#else
internal static readonly bool debug=false;
#endif

--
C#, .NET and Complex Adaptive Systems:
http://blogs.geekdojo.net/Richard
"Daniel P." <da******@hotmail.comU> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
How can I figure out at run-time if he code that runs is a debug or a
release build?

Thanks!

Nov 16 '05 #2
Thanks!

"Richard A. Lowe" <ch*****@yumspamyumYahoo.com> wrote in message
news:OY*************@TK2MSFTNGP11.phx.gbl...
Why not create your own? I don't think there's any other easier way.

#if DEBUG
internal static readonly bool debug=true;
#else
internal static readonly bool debug=false;
#endif

--
C#, .NET and Complex Adaptive Systems:
http://blogs.geekdojo.net/Richard
"Daniel P." <da******@hotmail.comU> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
How can I figure out at run-time if he code that runs is a debug or a
release build?

Thanks!

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: shan | last post by:
#include<fstream> #include<iostream> #include<string> #include<iomanip> #include<stdlib.h> #include<conio.h> #include<stdio.h> using namespace std; class library
10
by: Mike | last post by:
I know this sounds strange but I am at a loss. I am calling a simple funtion that opens a connection to a SQL Server 2000 database and executes an Insert Statement. private void...
1
by: Sam Kong | last post by:
Hello! I am using VC# 2005 Express Beta. DEBUG flag is not automatically set when I run at debug mode #if DEBUG //... #endif
4
by: | last post by:
Hi, does anyone know what would be the (most common) reasons to get difference answers in VC++.net between running in release and debug ? Thanks, JC
1
by: marco_segurini | last post by:
Hi, At the moment I am using Visual Studio 2005 beta 1. The following program does not compile using the debug configuration setting the "Disable Language Extensions" flag to "Yes(/Za)" while...
0
by: Shmuel Apple via .NET 247 | last post by:
We have recently migrated our LDAP DB from OpenLDAP which sits on Linux to Tivoli (IBM) which sits on a Win2003 machine. All of our code opposite LDAP run as NT Services and both our vb.net and...
1
by: adhingra | last post by:
I stumbled upon something which does not make sense "Debug class methods are not automatically suppressed by the managed c++ compiler when the project is build in release mode" Create a a...
4
by: nmrcarl | last post by:
I'm trying to upgrade a large project from VS 6.0 to VS 2005. After fixing a lot of things that changed (mostly sloppy coding in the original project that VS2005 didn't allow), I got the release...
2
by: Bill_DBA | last post by:
I have the following stored procedure that is called from the source of a transformation in a DTS package. The first parameter turns on PRINT debug messages. The second, when equals 1, turns on the...
0
by: Grant Schenck | last post by:
I have an ASP application which uses a COM object I developed. That object uses OutputDebugString as well as writing to a text file to trace internal activity. If I test my ASP page from Visual...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.