In XCode, go to your project settings. Under the build tab, look for Preprocessor Macros. Set a variable (no need for an =x if you just want to use #ifdef) there for your debug build configuration, and do not define it for your release setting. Then you can use #ifdef and put in the name of the variable you defined to put in your debugging statements.
-Lee