How iOS development quickly navigates to a specific error code line when a program error crashes

Source: Internet
Author: User

"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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.