IOS app addon on startup using Xcode debugger, works fine without debugger

When launching an application on a device (iphone) it crashes on startup with no error messages. But if the device is not connected to xcode (not in debug mode) just open the app, it works fine.

The same code works great on a simulator.

Never seen this before, I think something went wrong in the code signing setup or LLDB debugger, but I can't seem to handle it.

I just can't work on a real device for debugging, any idea? Stops here:

int main(int argc, char * argv[]) {
    @autoreleasepool {
        // stop here:
        return UIApplicationMain(argc, argv, nil,  NSStringFromClass([AppDelegate class])); 
    }
}

      

==== 2015/6/19 Edited ====

Thanks to Jim Ingham gives a clear explanation. I used to install Xcode to throw all such exceptions:

enter image description here

This is useful when developing. However, this breakpoint exception includes both C ++ and Obj-C. By eliminating C ++ checkpoint capture, we can solve this problem:

enter image description here

+3


source to share


1 answer


Sometimes when you debug a real device, a newer version of Xcode will stop your prices at the start, as described in the question:

int main(int argc, char * argv[]) {
    @autoreleasepool {
        // stop here:
        return UIApplicationMain(argc, argv, nil,  NSStringFromClass([AppDelegate class])); 
    }
}

      



but this is not a real crash (I think this is just some security staff) and all you have to do is press the triangle button to go into debug mode.

Yes, I know there was no breakpoint, but do it anyway.

+7


source







All Articles