检测数组与问题(调试模式) [英] Detect array with issue (Debug mode)

查看:147
本文介绍了检测数组与问题(调试模式)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序在我打电话的时候很厉害

My app is crushing when i'm calling a few methods

我可以看到错误信息,我明白了什么,但是我不知道如何用消息检测出问题的数组。
我在项目中有很多数组。
我如何知道问题来自哪里?

I can see the error message and I understand what it say but I don't know how to detect the array with the problem by the message. I have lots of arrays in the project. how can I know from where the problem come from?

这是消息:

2014-12-16 15:07:01.830 myApp[2776:1237923] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(0x2a3eae3f 0x37a98c8b 0x2a2ffc49 0x114c07 0x2d8e515d 0x2d8e3835 0x2d8df47d 0x2d885b37 0x2d2adccd 0x2d2a96b5 0x2d2a953d 0x2d2a8f21 0x2d2a8d25 0x2d2a2bfd 0x2a3b15cd 0x2a3aec8b 0x2a3af093 0x2a2fd621 0x2a2fd433 0x316ab0a9 0x2d8e7809 0x12fee5 0x38018aaf)
libc++abi.dylib: terminating with uncaught exception of type NSException


推荐答案

要处理所有异常,请从Xcode单击显示断点导航器

To handle All exceptions, From Xcode click on Show the Breakpoint Navigator

单击 + 按钮在底部,弹出单击添加例外断点。

Click + button at bottom side and from pop up click on Add Exception Breakpoint.

这将添加异常断点应用程序,尝试再次运行,如果运行时异常发生,执行将停止。

This will add exception break points for application, try to run again and execution will stop if any runtime exception raised.

如果这不会帮助,启用僵尸环境的项目,从这个线程检查 -

If this will not help, enable zombie environment for project, check out from this thread -

如何从Xcode中设置异常断点

How to set exception breakpoint from Xcode

这篇关于检测数组与问题(调试模式)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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