what? “debug symbols file”
那文件如何产生?在 Xcode 的 build 中设置Strip Debug Symbols 为 Yes,就可以产生这个文件。
Strip Debug Symbols 设置后,标识符的名字也就会从编译的二进制文件中删除

由于在崩溃报告中,只会显示内存地址, 所以二进制文件不能直接读取。但是dSYM可以使崩溃报告中的内存地址重新符号化,阅读性更强。
where is dSYM?
在Archives中,保存有dSYM文件,选择Archive后的文件显示包内容,

how to use dSYM?
Xcode 中有 symbolicatecrash 可以分析 crash 原因

crash文件在哪里?
手机连接电脑后,查看View Device Logs

下面就可以使用 symbolicatecrash 来分析crash文件了

主要包含 Project.crash Project.app.dSYM ,工具(symbolicatecrash), 要注意crash版本要和dSYM版本一致
export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"
./symbolicatecrash ./Project.crash ./Project.app.dSYM > resymbol.crash
最后会生成 resymbol.crash
网友评论