Debug and Release build

Most compilers give programmers the option to generate debug version or release version ( often called as debug build and release build ) of the executable binary.

Usually the debug version would contain symbol table and other info depending on the platform and compiler being used. This information is used for debugging the application. This info is added in such a way that debugger can get info about the program variables and their locations. Other information, such as module address and names are also present.

This information is provided to make debugging easy and with the same names as the programmers used. Such information is used by debugger for creating watches for variables, trace mode , step mode, creating break-points and even allowing to modify the values of variable during run-time thus make bug-trapping easy.

MS-VC++ compiler by default generates Debug version. Since most of the windows environment based compilers provide the programmer debugging facilities within the IDE (that is why they are called Intergrated Development Enivronment ), novice programmers are not really aware that they are using the extra debugging facilities provided by the compiler.

However, on unix platform where programs are compiled without any IDE, code has to be compiled with debugging options enabled and it is debugged in debuggers.

This version should not be the final version of the executable as it contains the overhead of extra information (and also makes code-cracker's job easy ). Thus the final build must be "release" one which is smaller then the debug build.