Delphi 6 Pro 中抑制 IDE 拦截异常的条件定义?

发布于 2024-10-04 10:30:42 字数 201 浏览 0 评论 0原文

我知道我可以使用 Delphi Pro 6 中的 IDE 设置来阻止 IDE 拦截和处理 Delphi 异常(停止程序并进入调试模式),但不幸的是,这会关闭对所有异常的处理。访问冲突异常发生在我没有源代码的 DLL 中。我想知道是否有一个我不知道的条件符号,我可以在有问题的代码块周围定义/取消定义,这样至少我可以关闭该代码块周围的异常处理。如果没有,也许有一些技巧或技巧可以做到这一点?

I know I can use the IDE settings in Delphi Pro 6 to stop the IDE from intercepting and handling Delphi Exceptions (stopping the program and entering Debug mode), but unfortunately that turns off that handling for all Exceptions. The Access Violation Exception is happening in a DLL that I don't have the source code for. I was wondering if there is a conditional symbol I don't know about that I could define/undefine around the offending code block so at least I could turn off Exception handling around that code block. If not, perhaps some trick or technique to do so?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

‘画卷フ 2024-10-11 10:30:42

编译器指令控制编译器和链接器如何将源代码转换为可执行代码。调试指令不存储在 DCU 或二进制文件中,因此编译器指令无法控制您要执行的操作。

有多种方法可以控制异常处理。我在我几年前写的一篇文章中描述了它们

  • : “高级断点”定义调试器应在何处开始或停止异常中断。
  • 定义调试器将始终忽略的某些异常类。
  • 禁用异常停止。
  • 完全禁用调试。

Compiler directives control how the compiler and linker turn your source code into executable code. Debugging instructions aren't stored in the DCU or the binary, so compiler directives can't control what you're after.

There are several ways to control exception handling. I've described them in an article I wrote a few years ago:

  • Use "advanced breakpoints" to define where the debugger should start or stop interrupting on exceptions.
  • Define certain exception classes that the debugger will always ignore.
  • Disable stopping on exceptions.
  • Disable debugging altogether.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文