What's the difference between a Debug vs Release Build?

That’s a question I’ve been asked several times, and to be honest, I really didn’t know all the details. Till now. Read on.

What others have said

Requesting Gravatar... mcdeeiis May 10, 2006 12:21 PM
# re: What's the difference between a Debug vs Release Build?
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.
Requesting Gravatar... Shirish Kulkarni Aug 22, 2006 5:02 PM
# re: What's the difference between a Debug vs Release Build?
It's observed that some of the MSVC++ calls work find in the debug mode, but fail functionally in the release builds.

These are specifically referring to the FreeExtra call used in our application.

The debug mode shows a clear reducion in the private memory bytes, while release mode, does not show any changes.

Any help / pointers will be appreciatd ...

Regards,
Shirish
Requesting Gravatar... Joel Jan 09, 2007 2:45 AM
# re: What's the difference between a Debug vs Release Build?
* the sample code below written in VB.NET 2005 shows some of the "release" bug. Code below is working in debug mode but not in release mode.


badtrip!


Dim strdate As String
Dim strdate2 As String
Dim strlast As Integer = 1
strdate = Format(Date.Now, "MM/dd/yyyy").ToString
strdate2 = Format(Date.Now, "MM/dd/yyyy").ToString
If strdate.ToString <> strdate2.ToString Then
If strlast = 0 Then
End
End If
End If


Requesting Gravatar... Jay Jan 02, 2008 8:28 PM
# re: What's the difference between a Debug vs Release Build?
in Debug mode the complete debug symbol is emitted so that the code optimization is not taken place
but in release mode the complete debut symbol is not emitted so that code optimization is taken place
Requesting Gravatar... adeel Apr 23, 2008 2:26 AM
# re: What's the difference between a Debug vs Release Build?
The debug build is created with some embedded information which allows the debugger to debug the application and exposed the runtime behavior of the application. On the down side, the debug build is a bit slower and inefficient in execution and larger in size.
Requesting Gravatar... arun May 03, 2008 10:22 PM
# re: What's the difference between a Debug vs Release Build?
the last modifications in the project is stored in release foler why not in debug folder?
Requesting Gravatar... subrama Jul 09, 2008 6:56 AM
# re: What's the difference between a Debug vs Release Build?
Debug is for everything but Release is for something
Requesting Gravatar... dingleberry Aug 17, 2008 9:51 PM
# re: What's the difference between a Debug vs Release Build?
Arcane wizardry burn in hell!!!!!!!!!!!!!!!
Requesting Gravatar... Deepak Aug 19, 2008 1:06 AM
# re: What's the difference between a Debug vs Release Build?
please tell me which is better debug or build
Requesting Gravatar... Pandharinath Nov 04, 2008 1:15 AM
# re: What's the difference between a Debug vs Release Build?
I have one question
what is use of symbolic debug information ?
which is in Debug build.

And we can debug the code in Release mode then why symbolic debug information not required?

Requesting Gravatar... muthu.amr Feb 22, 2010 7:49 PM
# re: What's the difference between a Debug vs Release Build?
Release mode will execute faster than debug mode and release mode takes lesser size than debug mode.
Requesting Gravatar... Radeev May 27, 2010 2:03 AM
# re: What's the difference between a Debug vs Release Build?
XML Comments and inline comments are removed in released build.
Requesting Gravatar... Akshat sharma Jun 20, 2010 10:41 PM
# re: What's the difference between a Debug vs Release Build?
When you compile your application in release mode debug information is not generated and this is the option normally used when you want to deploy your application to client.debug mode is heavy since debugging info gets generated and is used while development to find out error in your code.
When we are moving code to production then we make the mode as Release. Because there no debug is required and the execution also very fast in this mode due to the .pdb file formation will not happens.
Requesting Gravatar... Prashant Kalmodiya Jun 23, 2010 2:18 AM
# re: What's the difference between a Debug vs Release Build?
Debug build
1. Basically this for developer
2. Complier code optimization is OFF

Release build
1. Basically this for Client to whom you want to distribute the application
2. Complier code optimization is ON

What do you have to say?

(will show your gravatar)
Please add 7 and 6 and type the answer here: