xCode 4.3.1 出现异常时总是跳转到主函数 [英] xCode 4.3.1 always jump to main function when having exception
问题描述
我的 XCode (v4.3.1) 总是跳转到 main:
My XCode (v4.3.1) always jump to main:
int main(int argc, char *argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate");
[pool release];
return retVal;
}
每当我有例外.我的 xCode 有什么问题?我该如何解决这个问题?请帮帮我!
whenever i have an exception. What's wrong with my xCode? How can I fix this issue? Please help me!
推荐答案
当抛出异常时,XCode 有时不会完全停止.如果你想知道它被抛出的确切位置,你可以在 objc_exception_throw
中设置一个断点并让它在 @throw
行处停止.
XCode will sometimes not stop quite where you want it when an exception is thrown. If you want to know exactly where it's thrown, you can set a breakpoint in objc_exception_throw
and have it halt right at the @throw
line.
如果您使用多个项目,一个额外的好处是,如果您将该断点添加到 Global Breakpoints
一次,它将适用于所有项目.
As a bonus if you're using multiple projects, if you add that breakpoint once to Global Breakpoints
, it will work in all projects.
这篇关于xCode 4.3.1 出现异常时总是跳转到主函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!