【发布时间】:2013-07-22 01:53:04
【问题描述】:
Xcode中如何添加异常断点?
int main(int argc, char *argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, @"AppController");
[pool release];
return retVal;
}
我的项目在下面的代码中随机崩溃,在谷歌中搜索,有人建议添加异常断点。我通过单击源代码行添加了断点。编辑断点不允许我更改类型。如何添加异常断点以及在哪里添加? (在 AppDelegate 中?
【问题讨论】:
-
它不会在给定的代码中崩溃。
-
@rptwsthi,是的,在 xcode 添加异常断点后,我得到了确切的崩溃行。太好了..为什么苹果不默认在调试模式下启用它...:)
-
@iPhoneChip:可能是因为它只是停在那里并且没有提供有关异常的信息。