Debug & Release scheme in XCode and openFrameworks
Difference between Debug and Release scheme
Debug is useful when developing your project, as it will provide the most information about where and why something crashed.
Release is useful when you’re done developing your project. Release will create a smaller, faster app — but it won’t give you much information if it crashes.
Preprocessor to tell debug and release scheme apart.
I often have lots of controls and debug information on the screen. To be able to see, how my app looks like without all of this, like to keep the release scheme free of all this information. As I've researched and even started a topic at the openFrameworks forum(but without reply), I assume, that there is no oF-native way of telling apart the debug and release scheme from inside the code.
A simple solution is to add a preprocessor macro to one of the schemes. I’ve decided to add IS_DEBUG to the debug-scheme.
Now I can use the IS_DEBUG preprocessor as follows:
#ifndef IS_DEBUG // Load Settings when in productive setup XML.loadFile(“settings.xml”); #endif
Tested with openFrameworks 0.8.0 and XCode 5Date: 2013-10-19 | Tags: openFrameworks, Debug, Release