Difference between Debug and Release versions?

Answers were Sorted based on User's Feedback



Difference between Debug and Release versions?..

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

Difference between Debug and Release versions?..

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

Difference between Debug and Release versions?..

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

Difference between Debug and Release versions?..

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

Post New Answer

More MFC Interview Questions

Explain StretchBlt and BitBlt

1 Answers  


If there is more than 100 control in a window how we can change the Taborder of a controls

4 Answers   Satyam,


1)To Remove WS_MINIMIZEBOX in a Frame ?

1 Answers  


What is document-view architecture ? Give me one real time example for SDI ?

2 Answers  


what if we provide two message handler for same message ?

1 Answers  






1) How do you Destroy a Dialog Box ?

2 Answers   Honeywell,


Have you ever used win32 APIs ?

4 Answers   Microsoft,


what message is sent to an application when the user presses the primary button?

0 Answers   University Exams,


I want recent paper pattern for HP company?

0 Answers   HP,


How WM_PAINT message gets called in MFC,please explain it . a)Who calls the WM_PAINT message? b)When it gets called? c)how it comes to message queue? Please Explain it

8 Answers  


What is thread & process?

15 Answers   Exaband,


If application hangs while SendMessage is waiting for the result, how you handle it?

2 Answers  


Categories