473,394 Members | 1,750 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,394 software developers and data experts.

#if DEBUG .. #endif

When I do this, all code in the middle turns gray. I assume this is
because DEBUG is not defined. But, I thought it was for debug mode.
Is there something I am missing, or do people manually add DEBUG to
the debug mode compilation? How do I tell the IDE which mode I am
currently in (debug / release), like VC++ allows me to (it says in a
toolbar which compilation mode you are currently in)? Perhaps I am
merely in release mode, and thus DEBUG is not defined.

Zytan

Mar 7 '07 #1
2 10505
When you change the Build Configuration of your project from Release to
Debug, the grayed out section should come alive. Check your configuration
properties to make sure that the DEBUG symbol is set to be used.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Zytan" wrote:
When I do this, all code in the middle turns gray. I assume this is
because DEBUG is not defined. But, I thought it was for debug mode.
Is there something I am missing, or do people manually add DEBUG to
the debug mode compilation? How do I tell the IDE which mode I am
currently in (debug / release), like VC++ allows me to (it says in a
toolbar which compilation mode you are currently in)? Perhaps I am
merely in release mode, and thus DEBUG is not defined.

Zytan

Mar 7 '07 #2
When you change the Build Configuration of your project from Release to
Debug, the grayed out section should come alive.
Ok, so how do I do that?
Check your configuration
properties to make sure that the DEBUG symbol is set to be used.
I see under Project -Properties... -Build -General, that "Define
DEBUG constant" is not selected. But, I assume by selecting this, I
am not choosing a debug build over a release build. In VC++, there
were multipl build configurations, with two as the default: debug and
release, where the debug automatically had DEBUG #defined, and release
did not (among a bunch of other things that normally distinguish the
two, such as code optimization, etc.)

Zytan

Mar 7 '07 #3

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

Similar topics

0
by: mg | last post by:
First, I compiled Python in DEBUG on Win32 with MSCV.net and the solution distributed in the Python packages. Second, I try to compiled NUMARRAY with my python debug : python_d setup.py build ...
3
by: Michael | last post by:
OK Guys, lets say that I've got some code that I want from time when I'm debuging but want to be able to turn off quickly. At the moment I'm doing: #define DEBUG_TEXTURE #define DEBUG_BSP...
4
by: emma middlebrook | last post by:
I have a question regarding asserting ... here's some code: string GetAssertMessage() { ... prepare a message string and return it... } void SomeMethod() { ...
6
by: pauldepstein | last post by:
To help me debug, I am writing a lot of information into a stream which I call debug. However, because of the large amount of time taken to print this information, I only want this printed while...
3
by: jt | last post by:
For some stupid reason, I can't get this to work in Release mode, but works well in Debug mode. Below is the function: Here is the line: pos=strpos(pszCmdLine,cmdLineStr); // in release mode...
2
by: FBM | last post by:
Hi, I am preparing project for submission and i'd like to allow the print out of debug messages. I know that with something like #define DEBUG #ifdef DEBUG print(X); #endif
7
by: Jon Davis | last post by:
In order to gracefully handle exceptions at runtime but cause the debugger to break in the place where the exceptions occur when debugging, I used to write code like this: #if !DEBUG try {...
4
by: Javier | last post by:
Hi all, thanks for the replies to my posts... Here is one more: I have a debug-log macro in my code like the following: --- important_things.h #ifdef DEBUG
8
by: ramhog | last post by:
I have a class which implements several interfaces. One of them I would like to have implemented only if it is a debug build. Is there a way to do this? Thanks.
1
by: moshehaim1 | last post by:
Hi, I am working with C++ code that needs to be maintained both in debug and release versions. The environment is Windows 32 bit with MSVC8. I downloaded the python installation for Win32 and...
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: 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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.