What is the difference between Debug Mode and Release Mode in Visual Studio 2010? [duplicate]
Possible Duplicates:
Debug/Release difference Performance differences between debug and release builds
What exactly is the different in compiling and开发者_运维知识库 running an asp.net/c# project in Debug mode VS Release Mode?
In Debug Mode your .exe
has debug information inside of it (source code, variable names and other similar stuff like that).
In Release Mode your .exe
lack of debug information makes it smaller and probably performs better due to its smaller footprint.
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.
Other compile arguments who giving you more debug info in producted executable and many more options who you wan read at msdn.
http://social.msdn.microsoft.com/Forums/en/csharpgeneral/thread/74db169a-e244-496e-ae97-8dfec18ff2e5
精彩评论