iOS Crash log analysis under Xcode6

Source: Internet
Author: User

1. Export Log file

Connect your phone to your Mac, open Xcode,window-devices-this Device, you can refresh all the log files left by the native crash, select your crash file, right-click-export log to User/crash directory

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/48/wKioL1X5NEngxLoKAAfvOdK77KE102.jpg "title=" 1d3460c3-6149-40b0-81d6-64aeb4bd02d4.png "alt=" Wkiol1x5nengxlokaafvodk77ke102.jpg "/>


2. Get apps and dSYM files

Xcode-window-organizer-archives can see all the files we have archive, find crash corresponding archive file, right-click-show in finder-right-show package content, will dsyms/ Xxxx.dsym and Products/applications/xxxx.app copied to the User/crash directory

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/4B/wKiom1X5Moui4-0_AAL4i1yAQtE439.jpg "title=" 387a2dce-e74d-4b7c-b9d9-b4c77237eddf.png "alt=" Wkiom1x5moui4-0_aal4i1yaqte439.jpg "/>


3. Get Symbolicatecrash File

Symbolicatecrash is an analysis tool from Xcode that can be used to locate a crash in the crash log on the machine and the application's. dsym file, replacing a heap of addresses in the crash log with the corresponding location in the code. Symbolicate is located

/applications/xcode.app/contents/sharedframeworks/dtdevicekitbase.framework/versions/a/resources/ Symbolicatecrash

If not found, execute the

Find/applications/xcode.app-name Symbolicatecrash-type F

Copy the Symbolicatecrash file to the/user/crash directory


4. Analyze Crash logs

Open the terminal and enter the following command sequentially

~$ CD ~/crash~$ export developer_dir= "/applications/xcode.app/contents/developer" ~$ symbolicatecrash Xxxx.crash Xxxx.app.dSYM > Report.crash

Open Report.crash, should have the following display effect

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/73/4B/wKiom1X5NcLwpKebAATFcJbHT4s515.jpg "title=" B0b46a0f-bb38-4498-ab67-3fc9a22ee2e9.png "alt=" Wkiom1x5nclwpkebaatfcjbht4s515.jpg "/>


We can easily know which line of code is causing the crash.


Eof

This article is from the "more than a cat" blog, please be sure to keep this source http://aprogram.blog.51cto.com/10591497/1695434

iOS Crash log analysis under Xcode6

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.