如何在iOS中使用dSYM文件解码崩溃日志? [英] How to decode a Crash log using dSYM file in iOS?

查看:235
本文介绍了如何在iOS中使用dSYM文件解码崩溃日志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的iOS应用程序崩溃了。我想用dSYM文件读取崩溃日志。怎么可能?

My iOS application crashed. I would like to read the crash log with the dSYM file. How is it possible?

推荐答案

首先,你需要三个文件:dSYM文件,应用程序文件和崩溃日志。

First of all, you need three files: the dSYM file, the application file and the crash log.

打开X代码,在项目导航器中显示Products文件夹,并在查找器中显示应用程序文件。在这里你也可以找到dSYM文件。将它们复制到一个文件夹。

Open the X Code, in the project navigator reveal the Products folder, and "Show in finder" the app file. Here you will find the dSYM file too. Copy them to a folder.

现在打开终端,然后导航到之前复制这两个文件的文件夹。运行: dwarfdump --uuid Application_name.app/Application_name
您应该收到应用程序的UUID。
运行以下命令: dwarfdump --uuid Application_name.app.dSYM - 您将再次收到UUID,该UUID应与先前收到的UUID匹配。

Now open the terminal, and navigate to the folder you copied previously the two files. Run: dwarfdump --uuid Application_name.app/Application_name You should receive the application's UUID. Run the following command: dwarfdump --uuid Application_name.app.dSYM - you will receive the UUID again, which should match the previously received UUID.

打开崩溃日志(X代码 - 管理器 - 崩溃),找到出现二进制图像标题的行。这是第一行中的另一个UUID,它应该与先前在终端中收到的UUID匹配。

Open the crash log (X Code - Organizer - crashes), and find the line where appears the "Binary images" title. Here is another UUID in the first line, which should match again with the previously received in the terminal.

现在,您可以确信在构建中记录了崩溃检查,再次打开崩溃日志文件,找到线程0部分,应该有两行包含您的应用程序名称和两个地址。例如:

Now, you are assured the crash was logged in the build you are examining, so open again the crash log file, find the Thread 0 section, and there should be two lines with your application name and two addresses. Such as:

Application_name 0x123456
Application_name 0x987654

在终端中你应该立即运行: atos -arch armv7 -o address1 address2 (地址1和地址2应该是替换为前两个地址,armv7替换为你的系统 - 它显示在你获得UUID的行上。

In the terminal you should run now: atos -arch armv7 -o address1 address2 (the address1 and address2 should be replaced with the previous two addresses, and the armv7 with your system's - it is shown at the lines, where you got the UUIDs).

快乐的调试!

编辑:我想提一下这个帖子作为我的基地。

I would like to mention this post as base of mine.

这篇关于如何在iOS中使用dSYM文件解码崩溃日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆