使用C#的Visual Studio的调试模式和发布模式之间的差异 [英] Differences between Debug Mode and Release Mode of Visual Studio using C#

查看:106
本文介绍了使用C#的Visual Studio的调试模式和发布模式之间的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用C#的Visual Studio 2008中的调试和发布模式之间有什么区别?请从配置的角度详细介绍我.
感谢

What is difference between Debug and Release Mode in Visual Studio 2008 using C# ? Please, detail me from configuration point of view.
Thanks

推荐答案

Debug具有额外的检查,额外的初始化和其他功能,这些功能使查找问题更加容易,并且也未进行优化以使调试更有意义.由于所有这些设置,因此调试模式版本的运行速度仅为发布模式的速度的一部分.

Release模式没有释放模式的初始化.在调试模式下分配内存的地方,将其设置为一个值(永远不会为null,因此无论如何都要对其进行初始化始终是一个好主意),然后将其提供给您,释放模式只是分配内存并将其提供给您.发行模式也没有调试模式的额外检查.最终,释放模式得到优化.所有这些加在一起可以大大提高调试模式下的速度.

但是释放/调试模式可能会影响包含路径的唯一方法是通过/I(附加包含目录)指定目录.

参考: http://msdn.microsoft.com/en-us/library/wx0123s5.aspx [^ ]

Debug has extra checking, extra initialisaton and other features which makes locating problems easier, it is also not optimised to make debugging make more sense. Because of all of these settings though, the debug mode version runs at a fraction of the speed of the release mode.

Release mode has none of the initialisation of released mode. Where debug mode allocates memory, sets it to a value (which is never null, so it is always a good idea to initialise it yourself anyway) and then gives it to you, release mode just allocates the memory and gives it to you. Release mode also has none of the extra checking of debug mode. Finally release mode is optimised. All of these added together gives a large speed boost over debug mode.

But the only way release/debug mode could affect the include path is if a directory is given via the /I (additional include directories).

Refer: http://msdn.microsoft.com/en-us/library/wx0123s5.aspx[^]

Get more threads here[^]


您至少可以尝试自行找到答案. Google提供了很多信息.这是一个非常不错的一个:
http://stackoverflow.com/questions/4043821/performance-differences-between- debug-and-release-builds [ ^ ]
You could have at least tried finding the answer on your own. There is lots of information to be found by Google. Here is one quite nice one:
http://stackoverflow.com/questions/4043821/performance-differences-between-debug-and-release-builds[^]


这篇关于使用C#的Visual Studio的调试模式和发布模式之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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