Ios test basis 4: crash log analysis

Source: Internet
Author: User

Ios test basis 4: crash log analysis
Analyze and parse the crash log of the iOS application crash to obtain the suspicious code, precise to the class and code line; 1. first, get the crash log after the crash on the phone. There are many methods. Here we will introduce one. Connect your mobile phone to xcode and click xcode-Window-Devices, as shown in, to find the corresponding time point, right-click the crash Log information generated by the application, and select Export Log to save it to a directory. In this way, the crashlog file contains the application name, log.crashboard, 1.jpg2.jpg 2. second, obtain the information generated when the application is packaged. how to find the xcarchive file: xcode-Window-Organizer. After the file is opened, you can view the Archives list of all packages, find the Archives file corresponding to the crash package, Right Click show in finder, this file is "Application name + time. xcarchive "; 3. note: Put the two files obtained in step 1 and Step 2 in the same directory. 4. enable mac Terminal And enter the command line. The result of executing this command line is the corresponding class file name + the error code line number. In general, it is quite accurate .. After the atos-o file 1-arch arm64-l address 1 and address 2 are run, the result is as follows: Class Name and code line number information. It is quite concise to locate the cause of crash. 4.png command line: Source of file 1: Select File "Application name + time. xcarchive "-- Right-click to display the package content --" dSYMs "--" Application name. app. dSYM "--" Contents "--" Resources "--" DWARF "--" Application name "; --- the" Application name "is file 1, which can be dragged directly to the terminal; address 1 and address 2: Double-click to open the file "Application name + time + log. crash "-- find the Last Exception Backtrace, the Last Exception stack information, and find the logs related to the name of the crashed application in the information. As shown in, the red box shows the name of the crashed application, the following red arrow points to address 1, and the blue arrow points to address 22.163.jpg.

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.