Xcode:我应该在复制期间去除调试符号吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8828232/
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: Should I Strip Debug Symbols During Copy?
提问by ma11hew28
The TestFlight SDKrecommends setting Strip Debug Symbols During Copy
to YES
in Xcode Build Settings to enable the best crash reporting possible. I noticed that it's set to YES
by default.
该TestFlight SDK建议设定Strip Debug Symbols During Copy
到YES
在Xcode生成设置,以实现最佳崩溃报告可能的。我注意到它YES
默认设置为。
Should I change it to YES
? Why or why not?
我应该把它改成YES
吗?为什么或者为什么不?
回答by jasongregori
I work at TestFlight. Short answer is: set it to YES
.
我在 TestFlight 工作。简短的回答是:将其设置为YES
.
Long answer:
长答案:
@Kerni is correct. Before we started symbolicating server side, we needed that data to symbolicate on device.
@Kerni 是正确的。在我们开始对服务器端进行符号化之前,我们需要在设备上对这些数据进行符号化。
So if you upload your dSYM to TestFlight, you can strip them. If you don't want to upload your dSYM for some reason, you can leave them in and TestFlight can symbolicate on device.
因此,如果您将 dSYM 上传到 TestFlight,则可以删除它们。如果您出于某种原因不想上传您的 dSYM,您可以将它们保留,TestFlight 可以在设备上进行符号化。
Basically the README was not updated. Sorry @Manni! I will update it for the next release. (I'm going to remove that entire section).
基本上 README 没有更新。对不起@曼尼!我会在下一个版本中更新它。(我将删除整个部分)。
Sorry about the confusion!
很抱歉造成混乱!
回答by Kerni
If the default setting is YES
, there is no need to do anything else.
如果默认设置为YES
,则无需执行任何其他操作。
In general this setting makes sure that debug symbols are not part of the distributed binary which reduces the file size by 30-50%. The debug symbols should instead be written to the dSYM DWARF file, which can later be used to symbolicate crash reports.
通常,此设置可确保调试符号不是分布式二进制文件的一部分,从而将文件大小减少 30-50%。调试符号应改为写入 dSYM DWARF 文件,该文件稍后可用于符号化崩溃报告。
回答by Manni
The TestFlight SDK recommends to set this setting to NO, not to YES:
TestFlight SDK 建议将此设置设置为NO,而不是 YES:
To enable the best crash reporting possible we recommend setting the following project build settings in Xcode to NO for all targets that you want to have live crash reporting for. You can find build settings by opening the Project Navigator (default command+1 or command+shift+j) then clicking on the project you are configuring (usually the first selection in the list). From there you can choose to either change the global project settings or settings on an individual project basis. All settings below are in the Deployment Section.
- Deployment Postrocessing
- Strip Debug Symbols During Copy
- Strip Linked Product
为了启用最佳的崩溃报告,我们建议将 Xcode 中的以下项目构建设置设置为 NO,以针对您想要为其提供实时崩溃报告的所有目标。您可以通过打开项目导航器(默认 command+1 或 command+shift+j)然后单击您正在配置的项目(通常是列表中的第一个选择)来找到构建设置。从那里您可以选择更改全局项目设置或基于单个项目的设置。下面的所有设置都在部署部分。
- 部署后处理
- 在复制期间剥离调试符号
- 条带连接产品
Bugsense (http://www.bugsense.com/pages/faq) also recommend this setting with this explanation:
Bugsense (http://www.bugsense.com/pages/faq) 也推荐这个设置,解释如下:
Why do I get memory dumps instead of the stack trace for my iOS app?
iOS apps usually don't include debugging information or this information is included in a special file with the extension dSYM (debugging SYMbols). To turn on (and include in your binary) debugging information for your iOS app you must set to NO a project setting called “Strip Debug Symbols” for all project configurations.
为什么我的 iOS 应用会得到内存转储而不是堆栈跟踪?
iOS 应用程序通常不包含调试信息,或者此信息包含在扩展名为 dSYM(调试 SYMbols)的特殊文件中。要为您的 iOS 应用程序打开(并包含在您的二进制文件中)调试信息,您必须将所有项目配置的名为“Strip Debug Symbols”的项目设置设置为 NO。