It is possible to instruct the debugger to break when an exception occurs, before a handler is invoked.

  That allows you to debug your application immediately after the exception occurs.

  Navigating the Call Stack should allow you to figure the root cause of the exception.

  Visual Studio allows you to specify what category or particular exception you want to break on.

   A dialog is available from Debug > Exceptions menu.

  You can specify native (or managed) exceptions and aside from the default exceptions known to the debugger, you can add your custom exceptions.

  

  Here is an example with the debugger breaking when a std::exception is thrown.

  

VC++ Debug产生异常时中断程序执行Break on Exception的更多相关文章

  1. VC++ MFC单文档应用程序SDI下调用glGenBuffersARB(1, &pbo)方法编译通过但执行时出错原因分析及解决办法:glewInit()初始化的错误

    1.问题症状 在VC++环境下,利用MFC单文档应用程序SDI下开发OpenGL程序,当调用glGenBuffersARB(1, &pbo)方法编译通过但执行时出错,出错代码如下: OpenG ...

  2. 【译】x86程序员手册31- 第9章 异常和中断

    Chapter 9 Exceptions and Interrupts 第9章 异常和中断 Interrupts and exceptions are special kinds of control ...

  3. 编写高质量代码改善C#程序的157个建议[用抛异常替代返回错误、不要在不恰当的场合下引发异常、重新引发异常时使用inner Exception]

    前言 自从.NET出现后,关于CLR异常机制的讨论就几乎从未停止过.迄今为止,CLR异常机制让人关注最多的一点就是“效率”问题.其实,这里存在认识上的误区,因为正常控制流程下的代码运行并不会出现问题, ...

  4. 通过DeveloperApi获取spark程序执行进度及异常

    在应用spark时,经常要获取任务的执行进度,可以参照jobProgressListener的设计来完成该功能. 以下代码仅供参考,欢迎交流. 效果显示: 代码: package org.apache ...

  5. c语言编写51单片机中断程序,执行过程是怎样的?

    Q:c语言编写51单片机中断程序,执行过程是怎样的? 例如程序:#include<reg52.h>  void main(void)  {   EA=1;      //开放总中断   E ...

  6. Java 中的 int 与 Integer 用于 List&lt;Integer&gt; 时,以及通过打印变量检測程序执行和函数调用次数计数

    总结一下近期做的东西中遇到的问题 1. Java 中的 int 与 Integer 用于 List<Integer>  时 两者之间的关系都是非常清楚的.int 是基本数据类型,存储的是值 ...

  7. 编写高质量代码改善C#程序的157个建议——建议60:重新引发异常时使用Inner Exception

    建议60:重新引发异常时使用Inner Exception 当捕获了某个异常,将其包装或重新引发异常的时候,如果其中包含了Inner Exception,则有助于程序员分析内部信息,方便代码调试. 以 ...

  8. ArcGis执行StartEditing(true)时,winform程序直接崩溃.

    问题描述:在Program中配置了ArcGis的许可,又在winform窗体添加了许可,导致执行StartEditing(true)时,winform程序直接崩溃. 原代码如下: static cla ...

  9. VC Debug和Release区别

    https://msdn.microsoft.com/en-us/library/xz7ttk5s.aspx   Optimizing Your Code Visual Studio 2015 The ...

随机推荐

  1. 对象的序列化(Serialization)

    一.什么是序列化 序列化表示将一个对象转换成可存储或可传输的状态,序列化后对象可以在网络上进行传输,也可以存储到本地.对象的寿命通常随着生成该对象的程序的终止而终止.有时候,可能需要将对象的状态保存下 ...

  2. Reading assignments in science

    First, get a perspective: Review the assignment in the syllabus and any handouts (1-2 minutes)Maybe ...

  3. python和c#通用一致的des加密采用CBC和PKCS7

    在python下可以下载pydes 下载地址为 http://pydes.sourceforge.net/ 在c#下实现des加密较为简单,如下: using System; using System ...

  4. Building Vim from source(转)

    Compiling Vim from source is actually not that difficult. Here's what you should do: First, install ...

  5. X86服务器、小型机、大型机、塔式、机架式、刀片式服务器、工作站

    ü  服务器分:x86(PC)服务器,小型机(Unix服务器),大型机: pc服务器则主要指基于intel处理器的x86架构,是一个通用开放的系统. UNIX服务器,也就是中国业内习惯上说的小型机,在 ...

  6. CSS经验库

    1.兼容360浏览器 字体大小设置 开发中需要使用em单位 font-size: 0.83em; font-family: "Arial"; -webkit-text-size-a ...

  7. 在 SELECT 查询中使用集运算符

    在 SELECT 查询中使用集运算符,可以将来自两个或多个查询的结果合并到单个结果集中. 在进行集运算之前,请确保: (1)所有输入集合中,列数和列的顺序必须相同. (2)对应的列中,数据类型必须兼容 ...

  8. 图解SQL inner join、left join、right join、full outer join、union、union all的区别

    转于:http://justcoding.iteye.com/blog/2006487 这是一篇来自Coding Horror的文章. SQL的Join语法有很多:有inner的,有outer的,有l ...

  9. mapper.xml文件

    1. 概述 mybatis的真正强大在于它的映射语句.由于它的异常强大,映射器的XML文件就显得相对简单,如果拿它跟具有相同功能的JDBC代码进行对比,省掉将近95%的代码.mybatis是针对SQL ...

  10. myeclipse修改jsp文件的名称之后,再也打不开的解决方案

    方案一.重启myEclipse 方案二. 删除对应workspace目录下 “.metadata\.plugins\org.eclipse.jst.jsp.core\jspsearch” 里的 *.i ...