xCode 4.3.1 always jump to main function when havi

2019-05-25 00:29发布

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!

2条回答
ゆ 、 Hurt°
2楼-- · 2019-05-25 01:18

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

查看更多
该账号已被封号
3楼-- · 2019-05-25 01:26

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.

查看更多
登录 后发表回答