"Write in front" recently in the development of iOS. It was easy to get an error type based on LOGCAT information and navigate to the line of code that went wrong when the program was developed before the Android app, but recently when doing iOS it was found that Xcode could not locate the specific error line. Search for a bit, found a solution, is quite simple.
Step 1
Just add a universal breakpoint to Xcode. Here's how:
Click the item navigation breakpoint that,
Step 2
Click + sign:
Step by step to complete the operation as shown above.
Run the program again
Automatically on the breakpoint came here,
The log information is:
1 -- to- - One: -:19.635gesturerecognizer[1491: c07]-[__nscfnumber isequaltostring:]: Unrecognized selector sent to instance0x7a88df0 2 -- to- - One: the:21.148gesturerecognizer[1491: c07] * * * terminating app due to uncaught exception'nsinvalidargumentexception', Reason:'-[__nscfnumber isequaltostring:]: Unrecognized selector sent to instance 0x7a88df0'
This makes it easy to see that the program crashes because value has no isequaltostring method.
If I do not add a common breakpoint, the program will directly break the breakpoint to the main function.
PS: This method can only be the majority of such crashes. A small part of the error is not broken.
How iOS development quickly navigates to a specific error code line when a program error crashes