Difference between Debug and Release versions?
Answers were Sorted based on User's Feedback
Answer / vijayan
Both Debug and a Release versions are automatically created
with default options.
Debug version:
1. Full symbolic debugging information in Microsoft format.
2. Debugging more difficult.
3. Support files required. (MFC Dll’s)
4. More memory size.
Release version:
1. No symbolic debugging information.
2. Optimized for maximum speed.
3. Support files not required. (MFC Dll’s)
4. Less memory size.
Is This Answer Correct ? | 11 Yes | 0 No |
Answer / abhishek kesharwani ge mumbai
first of all there is nothing like debug or release this is only a default setting provided by the visual studio app wizard you can change the setting and make the debug as release or vice versa if you want you can create your own version with any name or can delete the existing on.
now here is difference between the default version debug and release.
Debug :
1. preprocessor macro _DEBUG is enabled.
2. compiler code optimization is off.
3. ASSERT is enabled.
4. Debug version of windows library and dll is used.
Release :
1. preprocessor macro NDEBUG is enabled.
2. compiler code optimization is ON.
3. ASSERT is disabled anything inside of ASSERT wan't be executed.
4. Release version of windows library and dll is used.
and one big difference becoz of that sometime code build in the debug is work and release version code do not work or crashed:
all variable in the debug version initialize from a known value that is not happen in the release other cause is on release version compiler optimization setting is ON.
Is This Answer Correct ? | 6 Yes | 0 No |
Answer / harsh nanchahal
Debug:
Uses MFC Debug Library
No Code Optimization
Debugging Diagnostic macros enabled(_DEBUG defined)
Release:
Uses MFC Release Libray
Code Optimization
Debugging Diagnostic macros disabled(NDEBUG defined)
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / varun k. singh
Q: Why does program work in debug mode, but fail in release mode?
The VC++ IDE offers the possibility to define configurations which include a set of project settings (like compiler / linker options, output directories etc.) When a project is created using AppWizard, you get two default configurations: "Win32 Debug" and "Win32 Release". These are just convenient starter configurations with several preset options which are suitable for typical debug builds or release builds respectively, but you are by no means restricted to those settings. Actually, you can modify those configurations, delete them, or create new ones. Now let's see what the two default configurations typically include and what distinguishes them:
Win32 Debug:
Subdirectory 'Debug' used for temporary and output files
Preprocessor symbol _DEBUG defined
Debug version of the runtime libraries is used
All compiler optimizations turned off
Generate debug info
Win32 Release:
Subdirectory 'Release' used for temporary and output files
Preprocessor symbol NDEBUG defined
Release version of the runtime libraries is used
Various compiler optimizations turned on
Generate no debug info
There are a few other differences, but these are the most important ones. Now, what's the first implication of all this? That, as opposed to a common misunderstanding, you can debug a release build. Just go to 'Project -> Settings', choose the Win32 Release configuration, tab 'C/C++', 'General' and set 'Debug Info' to 'Program Database'. Then go to the tab 'Linker', and turn on 'Generate Debug Info'. If you rebuild your project now, you will be able to run it in the debugger. Regardless of whether your program crashes or just doesn't behave as expected, running it in the debugger will show you why. Note however, that due to optimizations turned on in the release build, the instruction pointer will sometimes be off by a few code lines, or even skip lines altogether (as the optimizer didn't generate code for them). This shouldn't be a concern, if it is, turn off optimizations.
Is This Answer Correct ? | 1 Yes | 1 No |
Tell us something about MFC?
What are the special requirements for dialog box resources used in a form view?
how does conditionally close the Dialog Box ?
I can i set size of integer variable should be fixed for different operating systems(Ex i want integer size is 2bytes in OS)
What is the difference between Struts and JSF? Pls list some most suitable differences.
1)To Remove WS_MINIMIZEBOX in a Frame ?
What is the difference between hinsrtance and hprevinstance in WinMain function?
What interface must be supported by an ActiveX control?
if i modified data in 1 view how does the other view knows
What is the base class for MFC Framework ?
Difference between Debug and Release versions?
What is the range of intensity of RGB