12

I used to symbolicate the crash report in Xcode 5.1.1 directly as there was "Symbolicate & Re-symbolicate" in Devices section of Organiser. But after upgrading to Xcode 6.1, I could find neither symbolicate nor resymbolicate option to view the crash Log. I'm confused. How to do it?

Previously I used to sync the device with iTunes and view the Crashes from ~/Library/Logs/CrashReporter/MobileDevice. Clicking on any crash would open up with Devices(Xcode) and then symbolicate. But now, it opens up with Console and no option to symbolicate. Does Xcode 6.1 have any such option?

Pang
  • 9,564
  • 146
  • 81
  • 122
Honey
  • 2,840
  • 11
  • 37
  • 71

4 Answers4

26

Steps to symbolicate crash log manually in Xcode 6

  1. If you archived the release build before release, then go to STEP 2. Otherwise archive your final release build (without any code change).

  2. To locate your archive file, open organizer -> choose your project -> choose the latest archive file -> right click over it -> choose 'show in finder'

  3. Right click on '*.xcarchive' file and select 'show package content' option then go to Products folder -> Applications Folder ->YourAppName.app (.app extension is hidden in some machine)

  4. Copy and paste your .app file in different location. Put the crash log file also in the same folder. Open terminal app and go to the folder which you pasted, through 'cd' command

  5. And type the following command in terminal with your crash address

xcrun atos -o YourAppName.app/YourAppName -arch armv7 -l 0xbd000 0x0013f745

Note: If the above command doesn't work, then change "armv7 to armv7s" and check.

Eg: Crash log look like this, you need to get crash address and put it in the above command

3   CoreGraphics                    0x266814d3 CGPathAddLineToPoint + 171
4   YourAppName                     0x00140a8b 0xbd000 + 539275
5   YourAppName                     0x0013f745 0xbd000 + 534341
6   Foundation                      0x27152d6b __NSThreadPerformPerform + 383
7   CoreFoundation                  0x2640a375 
Dax
  • 6,908
  • 5
  • 23
  • 30
  • Can u tell how do I symbolicate from mobile...I backed up the mobile, then ~/Library/Logs/CrashReporter/MobileDevice-> Open the crash , it opens with Console.It doesnt show how to symbolicate from there... – Honey Nov 11 '14 at 09:55
  • @Honey Console won't symbolicate you crash log. Try the command in terminal which i mentioned in step 5 and put you crash address(which is in your crash log) Eg: "xcrun atos -o YourAppName.app/YourAppName -arch armv7 -l ". Please see 4 and 5 line of example crash log which i mentioned in answer, that has crash address. – Dax Nov 13 '14 at 08:28
  • @Dax,how to find you mention in step5 ' 0xbd000 0x0013f745 ' value from my crash report?? – IKKA Feb 26 '15 at 09:30
  • Please check the example. I copied 0xbd000 & 0x0013f745 from example crash log – Dax Mar 03 '15 at 06:12
  • thanks @Dax what if we don't have that second piece (0xbd000). I only have "0x1000f5a34 __mh_execute_header + 875060" – skinsfan00atg Nov 13 '15 at 20:32
  • @Dax I tried to run command that you mentioned above in step 5 "xcrun atos -o yanachat.app/yanachat -arch armv7 -l 0xa4000 0x000c247c". It is showing me a memory address "0x0002247c (in yanachat)" in return. How would it be helpful? How can I find the eroor using this memory address. Do i need to symbolicate it further? – Mughees Musaddiq Apr 27 '16 at 08:14
  • You are absolutely brilliant! This answer deserves to be as a selected answer. – Rizwan Ahmed May 21 '18 at 18:12
14

A plugin is available for Xcode under the Product menu. This plugin is available through Alcatraz package manager or can be directly downloaded from github.

This plugin internally incorporates a shell script that does the set up of running the following commands for manual crash symbolication.

  1. Set an alias to symbolicatecrash.pl perl script

alias symbolicatecrash='/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash'

  1. To find symbolicatecrash, should it differ from the alias above:

find /Applications/Xcode.app -name symbolicatecrash -type f

  1. Set the DEVELOPER_DIR variable:

export DEVELOPER_DIR='/Applications/Xcode.app/Contents/Developer'

  1. With the dSYM the crash can be symbolicates as:

symbolicatecrash /path/to/MyApp_2012-10-01_Device.crash /path/to/MyApp.app.dSYM.

MaheshShanbhag
  • 1,484
  • 15
  • 14
  • Plugin no longer works with XCode 7 and up. The thing that fully works out of box is here: http://stackoverflow.com/a/17747804/1506363 – Nirav Bhatt May 04 '16 at 06:38
  • 1
    The path for me was `/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash` when using **Xcode 7.3**. – testing Jun 09 '16 at 12:38
4

Simply connect an iOS device, open Devices > The Device > View Device Logs, then drag and drop the crash to the list of crash files for the that device. The crash will be added to the list and will be symbolicated as long as the original archive exist.

egsemsem
  • 111
  • 3
  • Just make sure that you know it takes a little while and Xcode does a crappy job of telling you it's processing the file. You'll need to wait 5 - 10 seconds for it to complete. – Alex Zavatone Jul 07 '16 at 06:09
  • 1
    I wonder, does anybody get the same result as I am? Only standard libraries functions is symbolicated, my app's methods are still hex symbols like `0x1000f8258 0x10009c000 + 377432`. I have an archive of the app in the Xcode Organizer. I tried what @Dax is proposed and I can see something more meaningful than hex, but still I don't understand why Xcode couldn't do this automatically, maybe I'm doing something wrong? – Dima Deplov Aug 24 '16 at 10:06
0

Connect the iOS device, open Devices (shift command 2), select the device and click 'View Device Logs'. On the left side bar, the crash logs will appear. Select the one you're interested in.

As long as you have archived the build that was running on the device at the time of the crash, the crash log will be symbolicated automatically after a few seconds. If not, right click the crash log and select 're-symbolicate log'.

Tuslareb
  • 1,200
  • 14
  • 21