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

What do you have to say?

(will show your gravatar)
Please add 1 and 8 and type the answer here: