VS2010使用Release进行调试的三个必须设置选项
2018-06-17 20:45:03来源:未知 阅读 ()
How to: Debug a Release Build
You can debug a release build of an application.
To debug a release build
-
Open the Property Pages dialog box for the project. For details, see Working with Project Properties.
-
Click the C/C++ node. Set Debug Information Format to C7 compatible (/Z7) or Program Database (/Zi).
-
Expand Linker and click the General node. Set Enable Incremental Linking to No (/INCREMENTAL:NO).
-
Select the Debugging node. Set Generate Debug Info to Yes (/DEBUG).
-
Select the Optimization node. Set References to /OPT:REF and Enable COMDAT Folding to /OPT:ICF.
-
You can now debug your release build application. To find a problem, step through the code (or use Just-In-Time debugging) until you find where the failure occurs, and then determine the incorrect parameters or code.
If an application works in a debug build, but fails in a release build, one of the compiler optimizations may be exposing a defect in the source code. To isolate the problem, disable selected optimizations for each source code file until you locate the file and the optimization that is causing the problem. (To expedite the process, you can divide the files into two groups, disable optimization on one group, and when you find a problem in a group, continue dividing until you isolate the problem file.)
You can use /RTC to try to expose such bugs in your debug builds.
For more information, see Optimizing Your Code.
===============
在有的情况下,我们可能不能直接利用Debug模式进行程序调试,那么如何在Release模式下进行程序调试呢?
一、将项目属性设置为Release,生成--->配置管理器:
二、按Alt+F7,弹出属性页进行设置:
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
- C++ 在名称空间中使用using声明和using编译指令 2020-05-29
- 1.ffmpeg、ffplay、ffprobe命令使用 2020-05-11
- 关于使用ffmpeg的一些牢骚 2020-05-08
- G++编译链接的那些事!G++的特殊使用方法[常用] 2020-04-19
- c/c++ 使用valgrind检查内存泄漏 2020-04-14
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash