本文转至:http://www.cnblogs.com/85538649/archive/2011/11/09/2242304.html
在写iOS程序时,无论你是新手还是牛人,都有可能会碰到EXC_BAD_ACCESS。而此时你的debug area中不会显示任何信息可以来帮助你找出问题。此时就需要打开NSZombieEnabled来提供更多有用的信息。
在XCode 4.2中,有两种方法来打开NSZombie。
方法一,添加环境变量, 在菜单中,选择Product->Edit Schema, 选择Run (App Name), 在Arguments下面的Environment Variables中,添加NSZombieEnabled, Value值为YES。
方法二,打开Diagnostics, 同样在菜单中选择Product -> Edit Schema, 选择Run (App Name), 在Diagnostics下,打开Memory Management下的Enable Zombie Objects.
此时,在运行程序,就会显示哪个instance已经被release了,而你还向这个对象发消息。
另补充一个显示行号的:
Xcode4中显示“Line Numbers”行号
1.在Xcode的工具列中选择 Xcode/Preferences
2.点击 “Text Editing” Tab
3.将“Line Numbers”复选框打勾即可
分享到:
相关推荐
Xcode调试技巧总结,仅供参考
iOS 15.5系统真机调试包,可以解决xcode调试高系统机型问题
Xcode iOS 16真机调试包 开发调试 iOS16适配
xcode真机调试包 12.2 (16E5212e),可真机调试ios12.2,来源xcode10.2 beta 4
xcode真机调试包,11.2---13.2版本。
xcode 16.1真机调试包
iOS 14.2 Xcode 调试包,下载后放到对应Xcode Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
xcode 11.2 真机调试包 xcode 11.2 真机调试包 xcode 11.2 真机调试包 xcode 11.2 真机调试包
Xcode真机调试包15.6.zip
iOS 14.2 Xcode 真机 调试包,下载后放到对应Xcode Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
这是16的真机调试包,文件直接解压放到 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
xcode 真机调试包 13.0.zip
xcode 11.3真机调试包 真机调试包 11.3真机调试包 xcode 11.3
xcode真机调试包 iOS11.2 真机调试
xcode真机调试所需,从xcode9.2解压获得,使用时解压到 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport即可
xcode 真机调试包15.5
xcode真机调试ios13.6,解压后放到/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport目录下,重启xcode即可进行ios13.6 beta版本真机调试
解压放到路径 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
Xcode真机调试包16.0.zip
随便打开一个文件夹(Finder),然后 command + Shift + G.../Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport 把上面的路径粘贴在里面。前往。然后把你需要的调试包放进去