Delphi,调试初始化部分

发布于 2024-10-27 21:49:25 字数 119 浏览 5 评论 0原文

我的问题是系统的某些部分出现了异常,但它发生在初始化期间,我无法弄清楚它在哪里或哪个异常。系统刚开始运行,然后突然关闭。

您有什么方法可以调试这种情况吗?

我正在使用Delphi5,以防万一。

My problem is that there is an Exception being raised in some part of the System, but it happens during initialisation and I can't figure out where or which exception it is. The system just begin to run and then it closes suddenly.

Do you have any methods to debug such a situation?

I am using Delphi5, just in case.

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

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

发布评论

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

评论(3

哥,最终变帅啦 2024-11-03 21:49:25

下载MadExcept。它适用于 Delphi 5,对于非商业用途是免费的(对于商业用途来说绝对是便宜的),并且非常适合追踪各种神秘的异常。

Download MadExcept. It works for Delphi 5, is free for non-commercial use (and is a definite bargain for commercial use), and works really well tracking down all sorts of mysterious exceptions.

哽咽笑 2024-11-03 21:49:25

使用F7(单步执行)命令启动应用程序,这将跳转到第一个单元初始化...然后您可以使用F7F8 像往常一样调试任何单元初始化部分,直到找到异常的来源。

有时,调试初始化是一项繁琐的工作……在取得进展时,您可以在初始化部分中放置常规断点,以便从已知点重新开始。

Start the application with the F7 (step into) command, this will jump to the first unit initialization... you can then use the F7 or F8 as usual to debug any unit initialization section until you find the source of your exception.

This is sometimes a tedious work to debug the initialization... while you're making progress, you can put regular breakpoints in initialization sections to start again from a known point.

再可℃爱ぅ一点好了 2024-11-03 21:49:25

使用这些接受的答案(调试器工具)后,您是否得到/找到了问题所在?您是否使用需要某些 DLL 的库/组件?根据我的经验(异常没有出现并且应用程序突然关闭);这是因为您无法加载 DLL。该异常不会在调试模式下显示,但当您刚刚运行应用程序时(不是在调试 Delphi 中),它会出现。

Have you get/found where the problem is after using those accepted answer (debugger tool)? Are you using lib/component that require some DLL? As my experience (exception doesn't appear and app closes suddenly); it is because something on your part unable load a DLL. The exception won't show in debug mode, but it'll appear when you just run the app (not in debug-Delphi).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文