How does building a project in Debug differ with in Release?

我只是一个虾纸丫 提交于 2019-12-13 03:04:12

问题


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, and vice versa?


回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/2650425/how-does-building-a-project-in-debug-differ-with-in-release

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!