How to: Debug a Release Build

You can debug a release build of an application.

To debug a release build

  1. Open the Property Pages dialog box for the project. For details, see Working with Project Properties.

  2. Click the C/C++ node. Set Debug Information Format to C7 compatible (/Z7) or Program Database (/Zi).

  3. Expand Linker and click the General node. Set Enable Incremental Linking to No (/INCREMENTAL:NO).

  4. Select the Debugging node. Set Generate Debug Info to Yes (/DEBUG).

  5. Select the Optimization node. Set References to /OPT:REF and Enable COMDAT Folding to /OPT:ICF.

  6. 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.

===============

设置在Release模式下调试的方法:
1.工程项目上右键 -> 属性
2.c++ -> 常规 -〉调试信息格式    选  程序数据库(/Zi)或(/ZI), 注意:如果是库的话,只能(Zi)
3.c++ -> 优化 -〉优化            选  禁止(/Od)
4.连接器 -〉调试 -〉生成调试信息 选  是 (/DEBUG) https://blog.csdn.net/haizimin/article/details/50262901

在有的情况下,我们可能不能直接利用Debug模式进行程序调试,那么如何在Release模式下进行程序调试呢?

一、将项目属性设置为Release,生成--->配置管理器:

二、按Alt+F7,弹出属性页进行设置:


VS2010使用Release进行调试的三个必须设置选项的更多相关文章

  1. vs2010下release版本调试设置

    设置在Release模式下调试的方法: 1.工程项目上右键 -> 属性 2.c++ -> 常规 -〉调试信息格式 选 程序数据库(/Zi)或(/ZI), 注意:如果是库的话,只能(Zi) ...

  2. [原]设置vs的release版本调试

    通过三步设置就可以实现realse下的调试啦: 1.设置“C/C++”------>“常规”------->“调试信息格式”设置成:“程序数据库(/Zi)” 2.设置“链接器”------ ...

  3. VS2010如何进行程序调试

    VS2010如何进行程序调试 一.前言 对于初步学习C++的朋友,程序的调试是一项必备的技能.尤其是像C++这样难学的语言,程序调试的基本方法更是至关重要.毕竟,谁也不想自己幸幸苦苦一天敲出来的代码就 ...

  4. vs2010中release模式下调试程序

    debug模式调试信息全,但是速度很慢,在数据量比较大的时候非常影响调试效率,release模式速度快,但是没有调试信息.所以在编译的时候很多编译器会提供一种折中的编译方式,在release下提供调试 ...

  5. vs2008 怎么在Release下调试代码

    vs2008 怎么在Release下调试代码 (适用VS2005/VS2008) 在当前工程点击右键选择properties,选择 All Configurations C++>General- ...

  6. vs2008 release下调试状态设置[转]

    这是一个老生常谈的话题,但还是有时候会漏洞一些设置.总结一些,总共需要三个地方设置, 分别是1)c\c++-> General->Debug Information Format. 2) ...

  7. dev c++必须修改的三处默认设置

    此文档记录参加pat考试并且以dev c++[针对5.11版本]软件作为开发工具时,必须修改的三个默认设置. 1.修改默认语言标准 Dev C++ 5.11 版本支持较新的 C 和 C++ 标准,但是 ...

  8. httpClient中的三种超时设置小结

    httpClient中的三种超时设置小结   本文章给大家介绍一下关于Java中httpClient中的三种超时设置小结,希望此教程能给各位朋友带来帮助. ConnectTimeoutExceptio ...

  9. Java中httpClient中三种超时设置

    本文章给大家介绍一下关于Java中httpClient中的三种超时设置小结 在Apache的HttpClient包中,有三个设置超时的地方: /* 从连接池中取连接的超时时间*/ ConnManage ...

随机推荐

  1. 【JS】input输入框只能输入数字

    一.实现思路 input只能输入纯数字的思路其实很简单,监听输入框值的变化,每次输入检索输入框的值,将非数字的字段替换成空,再将此值赋予给输入框. 关键代码: \d:匹配数字 ^/d:全文匹配非数字 ...

  2. 扒一扒HTTPS网站的内幕

    215年6月,维基媒体基金会发布公告,旗下所有网站将默认开启HTTPS,这些网站中最为人所知的当然是全球最大的在线百科-维基百科.而更早时候的3月,百度已经发布公告,百度全站默认开启HTTPS.淘宝也 ...

  3. 基于Hadoop2.6.5(HA)的HBase2.0.5配置

    1.配置 在CentOS7Three上配置,注意:一定要安装bin包,不能安装src包 /usr/local/hbase/hbase-2.0.5/conf 编辑hbase-env.sh,替换成如下配置 ...

  4. core Animation之CATransition(转场动画)

    用于做转场动画,能够为层提供移出屏幕和移入屏幕的动画效果.iOS比Mac OS X的转场动画效果少一点 UINavigationController就是通过CATransition实现了将控制器的视图 ...

  5. MyBatis空where拦截器

    最近项目中出现了至少两次因为Mybatis的动态where条件不满足导致实际sql语句的where条件为空,进而查询全表,当数据量比较大的时候,导致OOM的情况. 如何禁止这种情况,个人觉得三种措施: ...

  6. mybatis-generator-maven逆向工程

    在idea 中使用 mybatis的  mybatis-generator-maven-plugin  可以根据数据库 生成 dao层,pojo类,Mapper文件. 一:  在  pom.xml  ...

  7. NavicatForOracle无法连接数据库,报错ORA-28547

    因为换了新项目,要用到oracle数据库,但是用Navicat连接oracle不像连接MySql那样简单,连接的时候总是报ORA-28547,最后搜了一下解决方案发现是install client没有 ...

  8. oracle安装与备份导入

    win10安装oracle因运行版本问题导致安装时提示错误(可能win10未被甲骨文公司认证)  跳过的问题 需要更改配置文件: 配置位置在 : 具体操作如下图: 在安装时win10跳过了 许是因为环 ...

  9. Java - "JUC" CountDownLatch源码分析

    Java多线程系列--“JUC锁”09之 CountDownLatch原理和示例 CountDownLatch简介 CountDownLatch是一个同步辅助类,在完成一组正在其他线程中执行的操作之前 ...

  10. Sql Server分页储存过程

    --分页储存过程if exists (select * from sys.procedures where name='Page')drop proc Pagegocreate proc Page@P ...