How to enable NSZombie in Xcode?

后端 未结 15 2042
梦毁少年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 05:57

    Environment variables are now part of the "scheme".

    To edit the scheme and turn on zombies:

    • In the "Product" menu, select "Edit Scheme".

    • Go to the "Run Foo.app" stage in the left panel, and the "Arguments" tab on the right.

    • Add NSZombieEnabled to the "Environment Variables" section and set the value to YES, as you could in Xcode 3.


    In Xcode 4.1 and above, there's also a checkbox on the "Diagnostics" tab of the "Run" stage to "Enable Zombie Objects".


    With Xcode 6.4:

提交回复
热议问题