如何手动标记iOS崩溃以查看崩溃日志 [英] How to Manually Symbolicate iOS Crash to View Crash Logs
问题描述
尝试调试应用。麻烦的是我找不到这个程序。
Trying to debug app. The trouble is I cannot find this program.
symbolicatecrash.sh
symbolicatecrash.sh
sudo cp /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/iPhoneRemoteDevice.xcodeplugin/Contents/Resources/symbolicatecrash /usr/local/bin/
是单独下载吗?我正在使用XCode 3.2.3
Is it a separate download? I am using XCode 3.2.3
谢谢。
推荐答案
: XCode 4.3
您需要按照原始答案(下面)中列出的相同步骤进行操作,但有一些例外。
EDIT :: XCode 4.3
You will want to follow the same steps as outlined in the original answer (below) with a few exceptions.
首先,您需要修复Xcode路径。打开终端并运行:
First, you need to fix the Xcode path. Open a terminal and run:
/ usr / bin / xcode-select -print-path
/usr/bin/xcode-select -print-path
如果显示/ Developer或/Applications/Xcode.app/Contents/Developer/之外的任何内容,则表示错误。要解决此问题,请执行以下命令:
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 /
sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer/
您现在可以执行以下所有步骤,但 symbolicatecrash
命令处于新位置(再次)。这是因为Xcode现在安装为应用程序。 要查找 symbolicatecrash
从终端运行:
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
find /Applications/Xcode.app -name symbolicatecrash -type f
这应该返回:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash
在运行 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/版本/ A /资源/
cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/
原始答案:: Xcode< 4.3
symbolicatecrash的路径
使用以下方式从终端搜索:
Original Answer :: Xcode < 4.3
Path for symbolicatecrash
Search from a terminal using:
find / Developer -name symbolicatecrash -type f
find /Developer -name symbolicatecrash -type f
对我来说,这返回了:
/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash
/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash
如何手动识别崩溃日志
运行 symbolicatecrash
命令,将崩溃日志作为第一个参数,将dSYM文件作为第二个参数。请注意,如果您将从当前目录运行 symbolicatecrash
,那么必须将 ./
放在前面,如 ./ symbolicatecrash
除非您的PATH环境变量包含该命令所在的目录。
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.
我已更改为具有该目录的目录先输入 symbolicatecrash
命令(注意:Xcode 4.3会有所不同,见顶部):
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 /
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
./symbolicatecrash /somePath/MyCrashLogFile.crash /somePath/MyAppName.app.dSYM
如何查找dSYM文件:
您必须拥有用于创建崩溃版本的存档才能获取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.
以下是ste ps:
- 右键单击(或 ctrl 点击)来自管理器的存档,然后选择在Finder中显示。
- 从finder中的xcarchive文件中,右键单击(或 ctrl 单击)此文件,然后选择显示包内容。然后,您将看到dSYMs文件夹。
- 在dSYMs文件夹中,您将找到符号化文件所需的YourAppName.app.dSYM文件。
- Right click (or ctrl click) the archive from organizer and choose "Show in Finder".
- 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.
- Inside the "dSYMs" folder you will find "YourAppName.app.dSYM" file that you will need to symbolicate files.
这篇关于如何手动标记iOS崩溃以查看崩溃日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!