Enabling Dwarf DSYM Debug Information Format in Xcode

Posted in |

Enabling Dwarf DSYM debugging brings a number of benefits as listed in http://developer.apple.com/tools/xcode/symbolizingcrashdumps.html.

Most developers will have Xcode's debug build configuration set up to build for the local architecture will all the deployment options firmly disabled.

When building for release however we want to build for all architectures, we may want the deployment options on and may wish to extract our debug symbols into separate DSYM files.

However, we may also want to have debug friendly release versions that we can release to beta testers. If we strip all our debug symbols then our crash logs are that much harder to decipher, especially during beta testing when the floor is thick with crash reports.

My approach is to use a couple of xcode configuration files.

To create, add a new file to your project and give it a .xcconfig file extension. Additional xcode build settings can be entered in here and when the file name is selected in the build info for the project/target they will come into effect (unless overridden by local selections).

I generally use two xcode config files, one for expiring betas and one for deployment. Xcode's project build settings are generally left at default values.

So all code that is released is built as follows:

  • All code is compiled using the Release build configuration.
  • If it's beta/test code that expires then I use the expiring beta configuration. This ensures that the code will die and that debug info will be present in the build
  • Otherwise it's deployment code. Deployment processing is on and debug symbols are extracted into separate DSYM files

beta-expiring.xcconfig contains:

// macros
GCC_PREPROCESSOR_DEFINITIONS = EXPIREAFTERDAYS=42 MUGGINSOFT_BETA=1

deployment.xcconfig contains:

// macros
DEPLOYMENT_POSTPROCESSING = YES
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
GCC_PREPROCESSOR_DEFINITIONS = 
Submitted by Jonathan Mitchell on Tue, 08/18/2009 - 13:37

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
Let us know you are human.
2 + 1 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.