问题
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