当我不使用调试器时收到错误消息 [英] Recieving error message when I dont use the debugger

查看:71
本文介绍了当我不使用调试器时收到错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么时候是什么意思:

当我正常运行程序时,我收到一条错误消息,但是当我使用Visual Studio 2010的调试器时,我没有收到错误消息吗?该错误以某种方式被完全忽略.

该程序的作用是遍历注册表并显示文件扩展名的默认图标,错误消息是某些dll无法打开.该错误信息不会使程序崩溃.当我按OK时,迭代将继续正常进行. ,您会看到异常.

从您的信息中,我无​​法确定异常的确切原因,因此,我试图猜测为什么在调试器下运行和从可执行文件运行之间会有区别.首先,您没有描述错误消息"的显示方式.

一种可能的情况是:没有错误消息",并且始终运行的应用程序正常运行,无论是否在调试器下,但如果运行时异常被抛出,则始终在中间;异常处理程序考虑到这一点;并且不会将此异常进一步传播到堆栈(在catch块中没有重新抛出或引发另一个异常).
例如,如果找不到用于获取图标的DLL,则返回DLL.因此未使用这些图标,但仍允许应用程序运行.为什么不? -足够合理.只有您才能弄清到底发生了什么.

您在调试器下看到的内容可能只是此异常情况下的调试器断点.它不应该在正常运行时显示(因为异常处理程序抑制了传播),但是调试器已调整为在某些或所有异常时中断执行,使您可以继续执行.引发或捕获异常的点就像一个断点. (这是可选的,请参见下文.)

当调试器在异常处中断时,它会显示异常消息.这与错误消息"不太相同.您可以通过Debug->在VS中控制此有用的调试器选项集.例外...窗口.为了进行实验,请尝试关闭所有内容(以便调试器在引发或捕获某种异常时不会中断),然后查看您的错误消息"是否消失.不要忘记重要的调试器功能中的此功能,因此请正确设置此选项-它可以为您提供很多帮助.


MSDATL3.DLL文件与数据访问组件关联.您最近安装/卸载了某些东西吗?


What does it mean when:

I recieve an error message when I run the program normally but when I use Visual Studio 2010''s debugger I don''t? The error is somehow completely ignored.

What the program does is to iterate through the registry and display the default icons of file extensions and the error message is, that some dll cannot be opened. The error message does not crash the program. When I press OK the iteration continues normally.

解决方案

I assume you can reproduce the problem, that is: when running executable along there is no exception, when back to debugger, you see exception.

From your information, I cannot tell the exact reason of the exception, so I''m trying to guess why the difference between running under debugger and from executable. First of all, you did not describe how exactly "error message" is shown.

One possible scenario is: there is no "error message", and the always application goes normally, under debugger or not, but in the middle if run-time exception is thrown; and exception handler takes this into account; and propagation of this exception further up to stack is not done (there is no re-throw or throwing another exception in the catch block).
For example, if the DLL you use to obtain icon is not found; so these icons are not used, but it still allows application to run. Why not? -- reasonable enough. Only you can sort out what exactly happens.

What you see under debugger can be just the debugger break point at this exception. It is not supposed to be shown during normal run-time (because exception handler suppress propagation), but the debugger is tuned to break execution at some or all exceptions, which let you to continue execution. The point of throwing or catching exception works like a break point. (This is optional, see below.)

When the debugger breaks at the exception, it shows exception message. This is not quite the same as "error message". You can control the set of this useful debugger options in VS via Debug -> Exceptions... window. For experiment, try to switch everything off (so the debugger won''t break at the point where some kind of exception is thrown or caught) and see if your "error message" disappears. Don''t forget that this in important debugger feature, so set this option properly -- it can help you a lot.


The MSDATL3.DLL file is associated with the data access components. Did you install/uninstall something recently?


这篇关于当我不使用调试器时收到错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆