How does building a project in Debug differ with in Release?
In visual studio or any other IDE, usually there are two build configurations, Debug and Release? How does the differ? Why sometimes you have compile errors when building in Debug mode, but not when in Release mode, a开发者_StackOverflow中文版nd vice versa?
Debug compiles with symbols and allows you to "see" your code when it runs. It also does some initialization of variables to help in the bug tracking process.
Release is generally optimized, and does not generate debug data.
Generally when you get compile issues toggling between the two, it relates to hard coded paths to folders.
MSDN on configurations
The debug build is created with some embedded information (symbols) which allows the debugger to debug the application and exposes the runtime behavior of the application. On the down side, the debug build is a bit slower and inefficient in execution and has a bigger memory footprint.
Source:http://www.programmersheaven.com/2/FAQ-VISUALSTUDIO-Debug-Release
精彩评论