Pages

Tuesday, July 14, 2009

The difference between debug mode & release mode

Debug Mode

This is used when developer develops an application
Complete symbolic debug information is emitted
Code optimization is not taken in to account
The IsJitOptimizerEnabled property (JIT compiler uses this attribute to disable optimizations for debug mode) is True
Generates .pdb file with debug information like breakpoints and assertions


Release Mode

This is used when developer delivers an application
Complete symbolic debug information is not emitted
Code execution is optimized
The IsJitOptimizerEnabled property is False


Size of the final executable is lesser than the size of the debug executable

Note: it is a good practice to keep the release and debug code similar, and not to have different behaviour, except extra (and slow) assertion


No comments:

Post a Comment