Finding out source of nsrangeexception

北慕城南 提交于 2019-12-05 04:09:13

Add an Exception breakpoint. This will stop on the line that raises the exception.

In the breakpoints navigator, click the plus in the bottom left, choose exception breakpoint, and all exceptions. You should have this on all projects really, it is invaluable. We'd have far fewer questions here, though!

Look further down in your crash log, and chances are that at some point it will point to an actual method and line.

For e.g. in the below block from a device crash log, the last line clearly points to the request:didLoad: method in the FacebookController.m class at line 264.

0x33defacb -[NSObject doesNotRecognizeSelector:] + 175
0x33dee945 ___forwarding___ + 301
0x33d49680 _CF_forwarding_prep_0 + 48
0x00037e47 -[FacebookController request:didLoad:] (FacebookController.m:264)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!