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

what is the meaning of constant FILE EXCEEDS LENGTH LIMIT while loading from ps file to vsam in the jcl?

0 Answers  


What is the difference between Extension DLL and Regular DLL?

6 Answers   GE,


1)how to Display the File Dialog Box, in MFC ?

1 Answers  


what is the difference between compiling and building?

1 Answers  


how to repaint when working with horizontal scroll bar

0 Answers  






What is the difference between Synchronous sockets and asynchronous sockets?

2 Answers  


What is Multithreading

1 Answers   Invensys,


How can server communicate with more than one client

2 Answers   Invensys,


Explain Doc/View architecture

6 Answers   Huawei,


What four types of properties are supported by an ActiveX control?

1 Answers  


What is the difference between GetMessage and PeekMessage ?

3 Answers  


Explain about MDI and CMultiDocTemplate ?

2 Answers  


Categories