3

Somehow my Xcode project stopped giving me the option to use the Debug build configuration for the Run scheme. enter image description here

I figure it has something to do with my Architectures settings in Build Settings:

enter image description here

Edit: It appears that the Debug configuration was deleted. I'm able to create it again by copying the Release configuration, but how do I get it to behave like the default Debug configuration?

Erik Villegas
  • 954
  • 13
  • 29
  • It would be simplest to create a new project (or at least a new target) just to get the default configurations / settings. – matt Nov 08 '14 at 00:48
  • look at this answer and create a new "Configuration": click on Project / Info / Configuration / `+` and ... `Debug` http://stackoverflow.com/a/6218526/1702413 – TonyMkenu Nov 08 '14 at 02:07
  • When I click on the + button it only lets me duplicate the Release config. I want the default Debug config with all the settings it comes with it. I only need this because the debugger doesn't really work in release mode. :( – Erik Villegas Nov 08 '14 at 04:56

1 Answers1

2

After a lot of searching I found there is no way to get the original Debug configuration that comes with each new Xcode project. Fortunately, Debug does not differ a lot from Release. So what I did was create a new Xcode project and compare the Build Settings. On a handful of options, there was a different value for Debug and Release. I copied these values into my original project.

The most noteworthy option is "Optimization Level" option. If you want your debugger to work fully, set it to "None [-O0]" for Debug. Another one was the preprocessor macro section. Setting DEBUG=1 here will allow you to use #ifdef DEBUG and all that.

Erik Villegas
  • 954
  • 13
  • 29