Saturday, October 2, 2010

Difference between Release and Debug Mode!!!!!!!!

In debug mode, many of the compiler optimizations are turned off which allows the generated executable to exactly match the source code. This allows a programmer to step into the code one line at a time. Debugging information is also generated which helps debugger to  figure out where it is in the source code. The debugging information is contained in the .pdb files that gets generated along with the dll.


Whereas in release mode, most of the compiler's optimizations are turned on. The source code could be changed drastically depending on the optimization the compiler does. Unlike debug mode the executable will be different from source code, hence break point cannot be set and no .pdb files gets generated in release mode.

Since compiler does lot of optimization, the performance will be faster in Release mode. For all Production releases the dlls should be built in release mode to get better performance whereas for Development the dlls should be built in Debug mode