单独的“调试"和“发布"版本? [英] Separate 'debug' and 'release' builds?

查看:41
本文介绍了单独的“调试"和“发布"版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为最好发布您的开发人员实际测试过的软件版本;因此,我倾向于从项目/makefile 中删除调试"目标,以便只有一个版本可以构建(以及测试、调试和发布).

I think it's better to release the version of the software which your developers actually tested; I therefore tend to delete the 'debug' target from the project/makefile, so that there's only one version that can be built (and tested, and debugged, and released).

出于类似的原因,我不使用断言"(另请参阅断言总是不好? ...)

For a similar reason, I don't use 'assertions' (see also Are assertions always bad? ...).

那里的一个人认为调试"版本的原因是它更容易调试:但是,我反驳说你最终可能想要支持和调试你发布的任何东西,所以你需要构建一个您可以在必要时调试的版本......这可能意味着启用调试符号并禁用一些优化,即使在发布"版本中也是如此.

One person there argued that the reason for a 'debug' version is that it's easier to debug: but, I counter-argued that you may eventually want to support and debug whatever it is you released, and so you need to build a release which you can if necessary debug ... this may mean enabling debug symbols, and disabling some optimizations, even in the 'release' build.

有人说这是个坏主意";这是我几年前制定的一项政策,已被烧毁:

Someone else said that "this is such a bad idea"; it's a policy I evolved some years ago, having been burned by:

  • 一些开发者测试了他们的调试版本,但没有发布版本
  • 一些开发者的编写错误,仅在发布版本中出现
  • 公司在测试不充分后发布发布版本(它曾经完全足够吗?)
  • 被要求调试发布版本

从那以后,我看到不止一家开发公司遵循这种做法(即没有单独的调试和发布版本).

Since then I've seen more than one other development shop follow this practice (i.e. not have separate debug and release builds).

你们的政策是什么?

推荐答案

这可能是次要的,但它与其他人在这里所说的相得益彰.拥有 QA 测试发布版本的优势之一是,随着时间的推移,您的软件的内置调试和日志记录功能将得到提升,因为开发人员需要找出 QA 中出现问题的原因.

This might be minor, but it adds up to what others have said here. One of the advantages of having QA test release builds is that over time the built in debugging and logging capabilities of your software will advance due to the needs of developers who need to figure out why things are going wrong in QA.

开发人员越需要调试发布版本,当客户开始遇到问题时,您将拥有更好的工具.当然,开发人员没有理由将发布版本作为开发周期的一部分.

The more the developers need to debug release builds, the better tools you'll have later when customers start having issues. Of course, no reason for developers to work on release builds as part of the development cycle.

此外,我不知道有哪家软件公司有足够长的周期来承担在版本测试期间将 QA 从调试切换到发布版本的开销.必须执行完整的 QA 周期是一件非常罕见的事情.

Also, I don't know any software company that has long enough cycles to afford the overhead of switching QA from debug to release builds halfway through a version's testing period. Having to do a full QA cycle is something that all too often happens pretty rarely.

这篇关于单独的“调试"和“发布"版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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