Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode debugger values nil when using different build configuration

I've decided to manage different PREPROCESSOR definitions for the same application target using different schemes that are hooked up to different build configurations. Meaning I have duplicated the Debug build configuration and gave it a new name (e.g. Staging). Afterwords defined Preprocessor macros that are defined to each new build configuration. Setup a new shared scheme that the "Run" step uses the new "Staging" (Debug duplicate) build configuration I have just created. The app runs fines, but I've noticed the debugger values are all nil. When setting the scheme to run from the "Debug" build configuration everything is fine. The new build configuration is a complete duplicate of the Debug one with an addition Preprocessor macro defined. This also occurs when renaming the Debug build configuration to anything else.

Is there any way to get the debugger to work with different (debug enabled) build configurations?

like image 735
user3470095 Avatar asked Mar 27 '14 19:03

user3470095


1 Answers

You probably have optimizations for that build scheme enabled. Happens to me when i run my apps in my archive scheme which always has optimizations turned on.

Check the scheme's run configuration and turn debug in there. (Run -> Info -> Build Configuration)

like image 111
Christian Kaas Avatar answered Oct 19 '22 01:10

Christian Kaas