Xcode Symbol Configuration Guide

2019, May 28    

Provide a summary on the proper symbol related configuration. in this article I will summarize some of the tricks and practice guidance iOS developer should follow for the properly configuration of XCode project. For the detailed list of XCode compilation items, there is a xcode document archive for user to refer.

Best Practices:

  • Item Debug Information Format: use DWARF for debug mode and DWARF + DSYM for release, with debug symbols embeded inside of the file, the debug interceptor can properly display the debug information.
  • Item Generate Debug Symbol: always on for all configurations, otherwise, there will be no local symbols.
  • Item Debug Information Level: turn to compiler default, otherwise some of the debug symbols will get lost, there are different levels of debug information level can be chosen, where the default on should be recommended, ‘Compiler Default’, for options like line tables will remove debug information details on each line.
  • Item Strip Debug Symbols During Copy: this is a relatively tricky problem, the switch will strip the binaries which are copied during the build phase. Based on the answers provided in stack overflow, it is recommended to strip the symbols. As long as the DSYM file is uploaded. On for release mode, Off for debug mode.
  • Item Strip Linked Product: similar to the previous configuration, it strips all the debug symbol information in the project, it is controlled by another upper layer switch: Post Processing which is default NO, and the striped linked product will not be taken into consideration. Again, if Post Processing is turned on and this configuration is also on, the product will be stripped.

Understanding of Sequences

During the compilation process, each of the configuration may have dependencies or priority order for each other.

References:

TOC