Xcode中的异常断点

iPh*_*hip 47 debugging xcode ios

如何在Xcode中添加异常断点?

int main(int argc, char *argv[]) {

    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    int retVal = UIApplicationMain(argc, argv, nil, @"AppController");
    [pool release];
    return retVal;
}
Run Code Online (Sandbox Code Playgroud)

我的项目随机崩溃在下面的代码中,在谷歌搜索,一些建议添加异常断点.我通过点击源代码行添加了断点.编辑断点不允许我改变类型.如何添加Exception Breakpoint以及添加位置?(在AppDelegate?

在此输入图像描述

Gur*_*uru 67

您可以在Xcode中轻松添加Exception Breakpoint.见下图:

在此输入图像描述


βha*_*avḯ 26

这是步骤.

  • 转到"断点导航器".

  • 单击导航器左下角的+符号.

在此输入图像描述

  • 你应该看到这个.

在此输入图像描述


rpt*_*thi 20

跟着这些步骤:

  • 在xcode上转到Breakpoint导航器(按命令+ 6 /对于xcode7 +命令+7)
  • 点击左下角的+按钮
  • 单击添加异常断点,按照下图中的说明操作

在此输入图像描述