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

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17802662/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 00:28:10  来源:igfitidea点击:

How to add Exception Breakpoint in Xcode?

iosxcodedebugging

提问by iPhoneChip

How to add Exception Breakpoint in Xcode?

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

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

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

My Project randomly crashed in below code, searched in google and some one suggested to add Exception Breakpoint. I added break point by clicking on source line..Editing breakpoint not allow me to change type. How to add Exception Breakpoint and where to add? (in AppDelegate?

我的项目在下面的代码中随机崩溃,在谷歌搜索,有人建议添加异常断点。我通过单击源代码行添加了断点。编辑断点不允许我更改类型。如何添加异常断点以及在哪里添加?(在 AppDelegate 中?

enter image description here

在此处输入图片说明

回答by Guru

You can easily add Exception Breakpoint in Xcode. See below image:

您可以轻松地在 Xcode 中添加异常断点。见下图:

enter image description here

在此处输入图片说明

回答by βhargav?

Here are the steps.

以下是步骤。

  • Move to "Breakpoint Navigator".

  • Click + symbol at bottom-left corner of navigator.

  • 移至“断点导航器”。

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

enter image description here

在此处输入图片说明

  • You should see this.
  • 你应该看到这个。

enter image description here

在此处输入图片说明

回答by rptwsthi

Follow these steps:

按着这些次序:

  • In Xcode move to Breakpoint navigator(use command+8in Xcode 11)
  • Click on the + option at the left bottom of the navigator and select Exception breakpoint.
  • 在 Xcode 中移动到Breakpoint navigatorcommand+8在 Xcode 11 中使用)
  • 单击导航器左下角的 + 选项并选择异常断点。

Exception Breakpoint

异常断点

  • An exception breakpoint will be immediately added to the Breakpoint list in the Breakpoint navigator
  • you can then edit additional Breakpoint Setting's as shown below.
  • 异常断点将立即添加到断点导航器中的断点列表中
  • 然后您可以编辑其他断点设置,如下所示。

Breakpoint settings

断点设置