如何在Xcode中启用NSZombie? [英] How to enable NSZombie in Xcode?

查看:266
本文介绍了如何在Xcode中启用NSZombie?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个崩溃且没有错误跟踪的应用程序.我可以看到部分内容,如果我进行调试,但无法弄清楚哪个对象正在僵尸化".

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".

有人知道如何在Xcode 4中启用NSZombie吗?

Does anybody know how to enable NSZombie in Xcode 4?

推荐答案

环境变量现已成为方案"的一部分.

Environment variables are now part of the "scheme".

要编辑方案并打开僵尸,请执行以下操作:

To edit the scheme and turn on zombies:

  • 在产品"菜单中,选择编辑方案".

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

转到左侧面板中的"Run Foo.app"阶段,然后转到右侧的"Arguments"标签.

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

NSZombieEnabled添加到环境变量"部分,并将其值设置为YES,就像在Xcode 3中一样.

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

在Xcode 4.1及更高版本中,运行"阶段的诊断"选项卡上还有一个复选框,用于启用僵尸对象".

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

使用Xcode 6.4:

这篇关于如何在Xcode中启用NSZombie?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆