用如下的方法可以非常方便停留到具体crash的某行代码

Adding an Exception Breakpoint

Add an exception breakpoint to your project in the breakpoint navigator.

To add an exception breakpoint
  1. In the bottom-left corner of the breakpoints navigator, click the Add button.

  2. Choose Add Exception Breakpoint.

  3. In the Exception pop-up menu, choose the type of exception on which you want execution to stop:

    • All. Stops on all exceptions.

    • Objective-C. Stops on Objective-C exceptions.

    • C++. Stops on C++ exceptions.

      To stop on a particular C++ exception, specify the exception name.

  4. Choose the phase of the exception handling process at which you want program execution to stop.

  5. Click Done.

    The screenshot shows the properties of an exception breakpoint.

Adding an Exception Breakpoint - Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 25 bey的更多相关文章

  1. Terminating app due to uncaught exception 'NSUnknownKeyException' this class is not key value coding-compliant for the key

     Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ViewController > se ...

  2. *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ViewController > setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key

    *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ViewController > ...

  3. 在使用可变数组过程中遇到*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[__NSCFDictionary setObject:forKey:]: mutating method sent to immutable object'问题

    *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[__NSCFD ...

  4. Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'

    报错: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlace ...

  5. iOS Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to

    刚接触iOS,依照教程操作执行出现错误 Terminating app due to uncaught exception 'NSInternalInconsistencyException', re ...

  6. *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '[<_UIFeedbackParameters 0x1d4442e50> setNilValueForKey]: could not set nil as the value for the key rate.'

    *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '[<_UIFeedbac ...

  7. Terminating app due to uncaught exception 'CALayerInvalid', reason: 'layer <CALayer: 0x7fda42c66e30> is a part of cycle in its layer tree'

    iOS App里面所有的View构成一个组件树,这个树里面如果有了闭环就会出现这个报错,最常见的你不小在某UIViewController里面写了这样的代码: someView.addSubView( ...

  8. iOS程序崩溃*** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [37.5 nan]'

    今天上班打开昨天的程序运行,昨天跑的很溜的程序今天竟然crash了,好郁闷啊!下面附上crash的栈打印信息: 经过一番调试终于找到了原因,程序crash是因为CALayer的位置中含有不存在的数,就 ...

  9. Terminating app due to uncaught exception 'NSUnknownKeyException', reason: xxxx

    出现错误的情景: 使用Swift自定义Cell, 然后将这个Cell在OC中使用, 由于为了能够在OC中使用和使用起来命名比较规范 我在Swift自定义的Cell前加了 @objc(DSProduct ...

随机推荐

  1. 【贪心】「poj1328」Radar Installation

    建模:二维转一维:贪心 Description Assume the coasting is an infinite straight line. Land is in one side of coa ...

  2. Android Studio问题记录

    1>Android Studio中module是什么,? 答:Android Studio是基于intellij,跟eclipse不太一样.对应关系如下: intellij的project -- ...

  3. Git学习——查看修改记录

    查看修改结果 修改之前commit的文件,输入下面的而命令,可以查看文件的改动,输入下面命令.还可以采用git diff命令来看看具体修改了什么. 如果确认无误,添加add和提交commit文件. g ...

  4. Linux-nginx服务(三)

    nginx的安装 官方:http://nginx.org/packages/centos/7/x86_64/RPMS Fedora-EPEL:https://mirrors.aliyun.com/ep ...

  5. Python数据类型(简单入门)

    数据类型(预了解) 1.数字类型 整型:int 即不带小数点的数,通常用来标识年龄,账号,身份证号,等级等整数. 浮点型:float 即带有小数点的数,通常用来标记身高,体重,科学计算等有小数点的数. ...

  6. 求分数序列的前n项之和

    有一个分数序列 2/1,3/2,5/3,8/5,13/8,21/13,.... 求这个分数序列的前n项之和. 输入 测试数据有多组,其第一行为一个正整数k(0<k<=90),表示测试数据的 ...

  7. swift写一个简单的列表unable to dequeue a cell with identifier reuseIdentifier - must register a nib or a cla

    报错:unable to dequeue a cell with identifier reuseIdentifier - must register a nib or a class for the ...

  8. 如何修改 WordPress 的默认 Gravatar 头像

    如何修改 WordPress 的默认 Gravatar 头像? wordpress默认的头像是下面这种 在Settings的Discussion中,默认选择第一个Mystery Person, 意思是 ...

  9. NYOJ 219 An problem about date

    An problem about date 时间限制:2000 ms  |  内存限制:65535 KB 难度:2   描述 acm的iphxer经常忘记某天是星期几,但是他记那天的具体日期,他希望你 ...

  10. 九度oj 题目1031:xxx定律 题目1033:继续xxx定律

    题目描述:     对于一个数n,如果是偶数,就把n砍掉一半:如果是奇数,把n变成 3*n+ 1后砍掉一半,直到该数变为1为止.    请计算需要经过几步才能将n变到1,具体可见样例. 输入:     ...