iphone - Turning on 'DEBUG' macro value -
In my code, I want to work some tasks conditionally:
#ifdef DEBUG NSLog (@ "I'm in Debug Mode"); #endif
I have configured Project-> Project Settings-> Build tab so that 'DEBUG' is listed as a user-defined setting with value of 1. The configuration dropdown in the debug is selected, it still does not turn on the debug build instructions, although I figured this would happen.
To allow this, what do I need to do during the construction phase?
You have to set a compiler flag for it.
To do this, get information on the target, make sure that you have selected debug configuration (and not all configurations), and other C flag and Other C ++ flag ( GCC 4.2 - Language in Xcode 3.1)
Then add the following as a value: -DDEBUG
for both.
It will define DEBUG to take it to Precompiler
Comments
Post a Comment