How to enable NSZombie in Xcode?

后端 未结 15 2045
梦毁少年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:58

    I encountered the same problem with troubleshooting EXC_BAD_ACCESS and had hard time to find the setting with Xcode 4.2 (the latest one that comes with iOS5 SDK). Apple keeps on moving things and the settings are no longer where they used to be.

    Fortunately, I've found it and it works for the device, not just Simulator. You need to open the Product menu in the Xcode, select Edit scheme and then choose the Diagnostics tab. There you have "Enable Zombie Objects". Once selected and run in debugger will point you to the double released object! Enjoy!

    In short

    Product->Edit Scheme->Diagnostics-> Click Enable Zombie Objects
    

提交回复
热议问题