Delphi 6 不触发断点

发布于 2024-10-19 20:17:00 字数 137 浏览 2 评论 0原文

在新工作站安装 Delphi 6 后,我遇到了断点问题。在调试模式下,环境不会触发断点,就像它们根本没有放置一样......

您是否遇到过类似的情况?我想原因是某些设置,但我找不到哪个……

提前TnX!

内马尼亚

After installation of Delphi 6 at new working station I issued problem with breakpoints. In debug mode environment doesn't trigger breakpoints like they are not placed at all...

Have you experienced similar situation? I suppose reason is some setting, but I cannot find which one...

TnX in advance!

Nemanja

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

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

发布评论

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

评论(2

Spring初心 2024-10-26 20:17:00

是的,这种情况有时会发生(不仅在 6 中)。

  • 启用除调试 DCU 之外的所有调试信息,除非您想调试 Borland 代码。 (不要忘记检查代码中的编译器开关)。
  • 禁用代码优化器。
  • 重建所有代码。
  • 如果您使用 DLL,请确保在所有项目中启用调试代码并将主机应用程序设置为正确的可执行文件。

如果失败了。

  • 确保代码处有蓝点。
  • 确保您拥有正确的源文件。您可以通过添加错误(例如 dghasgsgd)并重新编译来检查这一点,如果编译器接受,则这不是正确的源文件。
  • 确保已达到代码(添加 SendMessage 语句或消息框,以便确保已达到该语句。)。
  • 重新启动编译器。或者甚至重新启动电脑。

如果失败了。

  • 休息一下。吃顿午餐或喝点东西。
  • 返回并向同事展示问题。 (最好也是程序员)。

Yes, this sometimes happens (not only in 6).

  • Enable all debug information except debug DCU's unless you want to debug the Borland code. (Don't forget to check for compiler switches in the code).
  • Disable code optimizer.
  • Rebuild all code.
  • If you are using DLL's be sure to enable debug code in all projects and set the host application to the right executable.

If that fails.

  • Be sure that there are blue dots at the code.
  • Be sure you have the right source file. You can check this by adding an error (for example dghasgsgd) and recompile, if the compiler accepts, this is not the right source file.
  • Be sure the code is reached (add a SendMessage statement or a message box so you can be sure the statement is reached.).
  • Restart the compiler. Or even restart the pc.

If that fails.

  • Take a break. Have a lunch or get something to drink.
  • Return and show the problem to a coworker. (preferably a programmer too).
江湖正好 2024-10-26 20:17:00

我应用了 @Gamecat 建议的所有设置,因此您可以查看此答案,就像对先前答案的简短补充一样。

我只错过了一个来解决我的问题。在“工具”>“调试器选项”中,我检查了“集成调试”,它使我的断点处于活动状态。当断点开始工作时,我收到错误消息“Project _.exe 引发了异常类 EAccessViolation,并显示消息“模块“IDPDX32.DLL”中地址 4CDEB080 处的访问冲突”。为了解决这个问题,我只是在菜单“工具”>“调试器选项”>“语言异常”中取消选中“出现 Delphi 异常时停止”选项。

现在Delphi工作正常,不需要重新安装。

丢失以前工作正常的配置的原因可能是当路径错误时将我的文件从一个文件夹复制到另一个文件夹(以及配置和其他临时文件),之后我可能删除了旧的配置文件并从头开始设置。 ..

+1 提示:如果您收到此消息:[错误] RLINK32:文件中不支持的 16 位资源 ....\estands\estandar_StdFormMainFrm.DFM 问题出现在文本中-DFM 选项。当您在 IDE 中右键单击表单时,是否选中了菜单项“Text-DFM”(或者可能称为“Text as DFM”)?如果没有,请保存并尝试编译。

如果有人知道这种行为的原因,详细的解释将会很有用。到目前为止,我发现此选项是为了向后兼容旧的 Delphi 版本。

I applied all settings that @Gamecat suggested, so you can look at this answer like short addition to previous answer.

I missed only one more to solve my problem. In Tools>Debugger Options I checked Integrated Debugging which alive my breakpoints. When breakpoints started to work, I got error message 'Project _.exe raised exception class EAccessViolation with message 'Access violation at address 4CDEB080 in module 'IDPDX32.DLL'. ' For solving this issue I just unchecked option 'Stop on Delphi Exceptions' in menu Tools>Debugger Options>Language Exceptions.

Now Delphi works fine and don't need to reinstall it.

Reason for loosing my previous configuration that worked fine might be in copying my files from one folder to another (as well as config and other temp files) when paths became wrong and after that I probably deleted old config files and started with settings from beginning...

+1 Tip: If you get this message: [Error] RLINK32: Unsupported 16bit resource in file ....\estands\estandar_StdFormMainFrm.DFM problem is in Text-DFM option. When you right-click on the form in the IDE, is the menu item "Text-DFM" (or maybe called "Text as DFM") checked? If not, do so, save and try to compile.

If somebody knows reason for this behaviour, detailed explanation would be useful. Until now I found this option is for backwards-compatibility to older Delphi-versions.

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