[ios]如何手动symbolicate一个crash log文件

转自stack overflow


注: Error: "DEVELOPER_DIR" is not defined at ./symbolicatecrash line 53.
解决办法:export DEVELOPER_DIR="/Applications/XCode.app/Contents/Developer"

EDIT :: XCode 4.3

You will want to follow the same steps as outlined in the original answer (below) with a few exceptions.

First, you need to fix the Xcode path. Open a terminal and run:

/usr/bin/xcode-select -print-path

If it displays "/Developer" or anything but "/Applications/Xcode.app/Contents/Developer/" then it is wrong. To fix this run the command:

sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer/

You can now run all the steps below, with the exception that the symbolicatecrash command is in a new spot (again). This is because Xcode now installs as an app. To find symbolicatecrash run this from the terminal:

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

This should return:

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

Before running symbolicatecrash you may wish to go to this directory like:

cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/


Original Answer :: Xcode < 4.3

Path for symbolicatecrash

Search from a terminal using:

find /Developer -name symbolicatecrash -type f

For me this returned:

/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash

How to Manually Symbolicate a Crash Log

Run the symbolicatecrash command with the crash log as the first argument and your dSYM file as your second argument. Note that if you will be running symbolicatecrash from the current directory that you MUST put ./ in front like ./symbolicatecrash unless your PATH environment variable includes the directory that the command resides in.

I changed to the directory that had the symbolicatecrash command in it first (note: will be different for Xcode 4.3, see top):

cd /Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/

Then I executed the following command:

./symbolicatecrash /somePath/MyCrashLogFile.crash /somePath/MyAppName.app.dSYM

How to Find the dSYM file:

You must have the archive that was used to create the build with the crash to get the dSYM file.

Here are the steps:

  1. Right click (or ctrl click) the archive from organizer and choose "Show in Finder".
  2. From the xcarchive file in finder, right click (or ctrl click) this file and choose "Show Package Contents". You will then see a "dSYMs" folder.
  3. Inside the "dSYMs" folder you will find "YourAppName.app.dSYM" file that you will need to symbolicate files.
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值