How to view the crash log of iOS app in xcode

Source: Internet
Author: User

Some stack information is often displayed during iOS app crash:

*** First throw call Stack:

(0x30cbcd6 0x2ee2a48 0x9cfd3 0x103ba29 0x2f05855 0x1011c 0x86d5d 0x2f3be99 0x67c0e6 0x722ade 0x86d5d 0x2f3be99 0x67c0e6 0x722ade 0x93da1a 0x2ea56
0x36d57d8 0x36d588a 0x679626 0x5a45 0x23f5)

Terminate called throwing an exception(Lldb)

I don't understand what it means: there is a way to display them. I can test it on xcode 4.3 and 5.1 simulators.


1. Add the following method to appdelegate. M:

Void uncaughtexceptionhandler (nsexception * exception ){

Nslog (@ "crash: % @", exception );

Nslog (@ "stack trace: % @", [Exception
Callstacksymbols]);

// Internal Error Reporting

}

2. In the following method of appdelegate. m, the first sentence of calling the following method is OK.

-(Bool) Application :( uiapplication *) Application didfinishlaunchingwitexceptions :( nsdictionary *) launchoptions

{

Nssetuncaughtexceptionhandler (& uncaughtexceptionhandler );

// Other normal operations

The following logs can be output when crash is tested:

Stack trace :(

0 corefoundation 0x02f3a03e _ predictionpreprocess + 206

1 libobjc. A. dylib 0x030cbcd6 objc_exception_throw + 44

2 corefoundation 0x02ee2a48 + [nsexception raise: Format: arguments:] + 136

3 corefoundation 0x02ee29b9 + [nsexception raise: Format:] + 57

4 corefoundation 0x02f392da-[_ nscfdictionary setobject: forkey:] + 250

5 myappname 0x0009cfd3-[xxxdetailview initwithdata: frame: Type:] + 4051

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.