Xcode调试和释放之间的差异 [英] Xcode Difference between debug and release

查看:145
本文介绍了Xcode调试和释放之间的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可可应用程序的调试和发布版本之间有什么区别?我知道调试版本包含调试的其他信息,但还有什么不同?

What are the differences between debug and release builds for a Cocoa application? I know the debug version contains additional information for debugging but what else is different?

推荐答案

我引用

这两者之间的最大区别是:
在调试版本中,调试应用程序时会发出完整的符号调试信息以帮助,而且不考虑代码优化。 $ b在发布版本中,符号调试信息不​​会被发出并且代码执行被优化
此外,由于符号信息不是在版本构建中发出的,所以最终可执行文件的大小小于调试可执行文件

"The biggest difference between these is that: In a debug build the complete symbolic debug information is emitted to help while debugging applications and also the code optimization is not taken into account. While in release build the symbolic debug info is not emitted and the code execution is optimized. Also, because the symbolic info is not emitted in a release build, the size of the final executable is lesser than a debug executable.

由于编译器优化或内存布局或初始化方面的差异,人们可能会发现发布版本中有趣的错误,通常被称为发布 - 只有错误:)

One can expect to see funny errors in release builds due to compiler optimizations or differences in memory layout or initialization. These are ususally referred to as Release - Only bugs :)

在执行速度方面,发布可执行文件的执行速度肯定更快,但并不总是会有所不同。

In terms of execution speed, a release executable will execute faster for sure, but not always will this different be significant."

感谢谷歌和用户mcdeeiis
http://haacked.com/archive/2004/02/14/difference-between-debug-vs-release-build.aspx

Courtesy of google and user mcdeeiis http://haacked.com/archive/2004/02/14/difference-between-debug-vs-release-build.aspx

对于所有编程语言来说,这是一个非常可靠的解释

This is a pretty solid explanation for all programming languages

这篇关于Xcode调试和释放之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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