xCode 4.3.1 always jump to main function when having exception

耗尽温柔 提交于 2019-12-08 01:30:07

问题


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;
}

whenever i have an exception. What's wrong with my xCode? How can I fix this issue? Please help me!


回答1:


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.

As a bonus if you're using multiple projects, if you add that breakpoint once to Global Breakpoints, it will work in all projects.




回答2:


There's nothing wrong with your Xcoode. Depend on types of exception, some exception will jump to main when the app crash.



来源:https://stackoverflow.com/questions/9680274/xcode-4-3-1-always-jump-to-main-function-when-having-exception

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!