[IOS] scheduling skills

Source: Internet
Author: User

Scheduling Skill 1:

ProgramDuring the crash, xcode often does not provide accurate stack information, but is positioned in the main method. This is a headache and misses, in fact, as long as xcode is installed with simple settings, it will be able to accurately provide stack information, open the left side of xcodeBreakpoint Navigator: Click the + sign below to add an exception breakpoint. You can select all and run it again. After crash, it stops when an exception is thrown.

 

Scheduling Skill 2:

Another type of crash, exc_bad_access, is a headache, because a variable in the crash may have been released earlier, and there is a problem with access. No logs are displayed in the console.Select Edit scheme with the scheme option.Click Enable zombie objects and malloc stack as shown in the figure. Remember to check the options only when you locate exc_bad_access.

Run again. If the exception breakpoint is stopped, enter C (CONTINUE) in the console and press enter to continue running until crash. Check whether there is a log of error information similar to SIGABRT on the console. You know what to find later.

if no logs exist, enter the Po $ eax flag in the console to indicate where the error occurred, applicable to simulators. You can use $ R0 to locate an error simulator such as exc_bad_access. You can also enter the following information: po [$ eax name] po [$ eax reason] and other commands to view the error and other information (note that there is no semicolon after square brackets ).

Related Article

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.