How to enable NSZombie in Xcode?

后端 未结 15 1923
梦毁少年i
梦毁少年i 2020-11-21 05:20

I have an app that is crashing with no error tracing. I can see part of what is going on if I debug, but can\'t figure out which object is \"zombie-ing\".

Does anyb

相关标签:
15条回答
  • 2020-11-21 06:16

    In xcode 4.2

    Goto, Product -> edit scheme -> click Run yourappname.app -> Diagonostics -> Enable Zombie object.

    0 讨论(0)
  • 2020-11-21 06:18

    Product > Profile will launch Instruments and then you there should be a "Trace Template" named "Zombies". However this trace template is only available if the current build destination is the simulator - it will not be available if you have the destination set to your iOS device.

    Also another thing to note is that there is no actual Zombies instrument in the instrument library. The zombies trace template actually consists of the Allocations instrument with the "Enable NSZombie detection" launch configuration set.

    0 讨论(0)
  • 2020-11-21 06:20

    Go to Product - Scheme - edit scheme - Arguments - Environment Variables set NSZombieEnabled = YES

    enter image description here

    enter image description here

    0 讨论(0)
提交回复
热议问题