Sunday, January 11, 2009

How to get symbolic stack traces on an iPhone exception

Very useful post from Gabriel Handford about getting symbolic information in stack traces. Good followup article from Ben Chatelain about some missing pieces. Gabriel said "For me, DEBUG is set in GCC_PREPROCESSOR_DEFINITIONS via the awesome GTM xcconfg files, which you should also be using," but since I'm not using them, I just added DEBUG to the command line. (Cmd-I on the target > Build > Preprocessor macros). I hit the same issue with NSDebug that Ben had, and copying the file over seems to solve the problem with running on the device itself and not just the simulator.

1 comment:

Ben said...

I just subitted an app through iTunes Connect which I had configured to include these nice stack traces in the Debug configuration. However, I forgot to exclude the NSDebug.h file when I built the app using the Distribution configuration. We'll see if it raises any red flags in a matter of days.