VC++ Debug产生异常时中断程序执行Break on Exception
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.
希望大家能把自己的所学和他人一起分享,不要去鄙视别人索取时的贪婪,因为最应该被鄙视的是不肯分享时的吝啬。