Xcode 崩溃管理器不符号化 .xccrashpoint 文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33131434/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode Crash Organizer does Not Symbolicate .xccrashpoint Files
提问by Zane Claes
The new Xcode 7 "Crashes" tab in the organizer shows a handful of crashes from the AppStore for my app. According to the documentation, there should be a stack trace. However, none of the 6 crashes have symbolicated stack traces:
管理器中新的 Xcode 7“崩溃”选项卡显示了 AppStore 中我的应用程序的一些崩溃。根据文档,应该有一个堆栈跟踪。但是,这 6 次崩溃都没有符号化的堆栈跟踪:
I've tried clicking "Open in Project" but it's just as useless:
Of course, I included the dsym and debug info when I submitted to the store. I still have the submission build in my organizer, so the dsyms are still present on my machine. How can I get a proper stack trace on this?
当然,我在提交到商店时包含了 dsym 和调试信息。我的组织者中仍然有提交版本,所以 dsyms 仍然存在于我的机器上。我怎样才能获得正确的堆栈跟踪?
采纳答案by esilver
Not ideal, but if you right-click an .xccrashpoint file, select "Show Package Contents", you can navigate its folder structure to find the actual .crash file which you can extract and then symbolicate through the command line using steps described here:
不理想,但如果您右键单击 .xccrashpoint 文件,选择“显示包内容”,您可以导航其文件夹结构以找到实际的 .crash 文件,您可以提取该文件,然后使用此处描述的步骤通过命令行进行符号化:
Run
跑
/Applications/Xcode.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/symbolicatecrash
Ensure that DEVELOPER_DIR
is set:
确保DEVELOPER_DIR
设置:
export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
回答by mychrisdangelo
Short Story:
短篇故事:
In Xcode 9.0: "The Crashes Organizer symbolicates unsymbolicated logs, if they are selected, using a local .dSYM indexed by Spotlight. (22550064)"
在Xcode 9.0 中:“崩溃管理器符号化未符号化的日志,如果它们被选中,使用由 Spotlight 索引的本地 .dSYM。(22550064)”
You can check out more on this in Xcode's Documentation.
您可以在Xcode 的文档中查看更多相关信息。
Long Story:
很长的故事:
When Xcode builds an .xcarchive for a machine code app it generates .dSYM files that are being indexed by Spotlight by default. For an app uploaded with bitcode you can use the Archives organizer to download dSYMs where they are being indexed by Spotlight by default.
当 Xcode 为机器代码应用程序构建 .xcarchive 时,它会生成默认情况下由 Spotlight 索引的 .dSYM 文件。对于使用 bitcode 上传的应用程序,您可以使用档案管理器下载 dSYM,默认情况下它们被 Spotlight 索引。
If you choose not to include symbol information when uploading your app to the App Store, the crash logs downloaded by the Crashes Organizer will be unsymbolicated. If you have the appropriate .dSYM files that were generated for the app version that crashed, Xcode will automatically symbolicate the crash when you click on the crash to view it. This functionality exists in Xcode 9.0+. You may manually invoke a re-symbolication by right-clicking on the log detail view and clicking "symbolicate".
如果您在将应用上传到 App Store 时选择不包含符号信息,则崩溃管理器下载的崩溃日志将不带符号。如果您有为崩溃的应用程序版本生成的适当 .dSYM 文件,当您单击崩溃以查看它时,Xcode 将自动表示崩溃。此功能存在于 Xcode 9.0+ 中。您可以通过右键单击日志详细信息视图并单击“符号化”来手动调用重新符号化。
回答by janineanne
I'm doing this for the first time in Xcode 10. Right clicking on my crash log and selecting Symbolicate was having no effect. I selected the build in the Archives section of the Organizer window and clicked the "Download Debug Symbols" button in the right-side pane. This didn't seem to do anything, but when I went back to Crashes and told Xcode to symbolicate the same crash again, this time it worked.
我是在 Xcode 10 中第一次这样做。右键单击我的崩溃日志并选择 Symbolicate 没有任何效果。我在 Organizer 窗口的 Archives 部分选择了构建,然后单击右侧窗格中的“Download Debug Symbols”按钮。这似乎没有做任何事情,但是当我回到 Crashes 并告诉 Xcode 再次象征相同的崩溃时,这次它起作用了。
回答by Graham Perks
You need to have the app's dsyms local. If this was a build uploaded from say, a build box, you won't have them. Head to App Store Connect, click the Activity tab, find your relevant build, and tap into it. The version details screen includes a link to download the dSYMs - do so, and expand the .zip file they download as.
您需要将应用程序的 dsyms 本地化。如果这是从构建盒上传的构建,则您将不会拥有它们。前往 App Store Connect,单击“活动”选项卡,找到您的相关版本,然后点击它。版本详细信息屏幕包括一个下载 dSYM 的链接 - 这样做,并展开它们下载的 .zip 文件。
Now back to your crashes in Xcode - they will symbolicate successfully.
现在回到您在 Xcode 中的崩溃 - 它们将成功象征。
Sanity tip: ensure your local source is at the same commit as the crashing release. Otherwise, if the source file has changed since the release, Xcode can dump you on the incorrect line. e.g. line 127 of your source has now moved to line 129 since you added two lines recently... and the crashes view has no idea about those changes. It'll show you line 127 crashing where the crashing code is actually on line 129.
理智提示:确保您的本地源与崩溃的发布处于同一提交。否则,如果源文件自发布以来发生了变化,Xcode 可能会将您转储到错误的行上。例如,您的源代码的第 127 行现在已移至第 129 行,因为您最近添加了两行……而崩溃视图不知道这些更改。它会显示第 127 行崩溃,而崩溃代码实际上在第 129 行。