XCode automatically generates a preprocessor macro for debug mode, for you, i.e: DEBUG = 1 So, if you want a piece of code to only be compiled into the app when debugging, you would wrap it in a #ifdef block:. #ifdef DEBUG //<your code here> #endif And inversely, if you only wanted to compile in a piece of code for release mode, you would wrap it in a #ifndef block: #ifndef DEBUG //<your code here> #endif You could also include the #else if you wanted to switch between certain pieces of code for debug and release respectively: #ifdef DEBUG //<your code here> #else //<your code here> #endif Thus whatever block you have running now in debug mode, will only be compiled in debug mode and the other part of the block will only be compiled in release mode. What you were doing here is looking to see if a preprocessor macro has been defined or not defined, and compiling in pieces of code based on that. However, if you noticed at the top,