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

查看:32
本文介绍了如何在 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文件、应用程序文件和crash log.

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

打开 X 代码,在项目导航器中显示 Products 文件夹,然后在 finder 中显示"应用程序文件.在这里您也可以找到 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 匹配.

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 Code - Organizer - crash),找到出现Binary images"标题的那一行.这是第一行中的另一个 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.

现在,您确信崩溃已记录在您正在检查的构建中,因此再次打开崩溃日志文件,找到 Thread 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(address1 和 address2 应替换为前两个地址,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天全站免登陆