The following error occurred while developing the app today:
2015-03-27 21:03:02.816 lightta[4120:1592638] * * * terminating app due to uncaught exception ' Nsinvalidargumentexception ' , Reason: ' * * *-[__nscfconstantstring stringbyappendingstring:]: nil argument '
First throw Call stack:
(0x2627645f 0x34139c8b 0x262763a5 0x26ee6923 0x95251 0x95123 0xcbc17 0x67c51 0x26fab89f 0x2623cfbf 0x2623c3cf 0x2623aa35 0 X261883B1 0x261881c3 0x2d775201 0x297f243d 0xc9205 0X346C5AAF)
Libc++abi.dylib:terminating with uncaught exception of type NSException
Then, the online search for a long time, found the following solutions:
Add an exception breakpoint (add Exception breakpoint) inside Xcode's breakpoint Navigator, then set the breakpoint condition so that it Exception: Object-C
can be broken before the exception is thrown, and you can see the call stack at that time.
Note that it is best to open this breakpoint when the problem code is about to be executed, otherwise it will be constantly disturbed by various anomalies.
Very useful, share to everyone!
Xcode How to debug Quick Locate error lines