Delphi 2010远程调试-无法使断点工作

发布于 2024-10-17 14:04:31 字数 1630 浏览 5 评论 0 原文

我最近发布了这个问题< /a> 关于我无法让 Delphi 2010 进行远程调试。我没有取得任何成功,因此决定发布一个简单的分步测试技术,该技术可能会突出显示我做错了什么。这对我来说真的很重要 - 我从 V1.0 开始就使用 Delphi 并靠它谋生。像这样被卡住是一种痛苦,它让我继续使用 Delphi 7。

无论如何,就这样吧。

  1. 确保 Delphi 2010 具有更新 4 和 5。

  2. 启动 Delphi 2010,然后选择 File |新 | VCL 表单应用程序。在表单上放置一个按钮,将 'ShowMessage( 'hello' ) 放入按钮 OnClick 事件中。将项目及其单元保存在本地文件夹“C:\scratch”中。构建项目,运行它,单击按钮,出现“hello”,一切正常。

  3. 在联网 PC (194.168.1.64) 上,创建一个新文件夹“c:\DebugTest”并以 R/W 访问权限共享它。

  4. 在 194.168.1.64 上,从 Embarcadero 网站 (RemoteDebugger_upd2.exe) 上的最新下载安装远程调试器。单击“rmtdbg140.exe”运行。接受来自防火墙的“取消阻止”消息。

  5. 使用输出目录 =\192.168.1.64\DebugTest 和单元输出目录 = c:\scratch 编辑 DEBUG 构建配置编译器设置 - 请参阅 Compiler settings

  6. 编辑链接设置以设置调试信息=True,包括远程调试符号=True。请参阅 链接设置

  7. 将编译设置保留为默认值。请参阅 编译设置

  8. 进行完整构建。相关项目exe“project2.exe”和“project2.rsm”出现在远程文件夹\192.168.1.64\DebugTest中。 IDE 中的 Unit2 中可以看到蓝点。

  9. 在“ShowMessage”行(按钮 OnClick 事件)上设置断点。

  10. 使用“运行”| “加载进程”,远程路径 = c:\ DebugTest \ Project2.exe,远程主机 = 192.168.1.64 和工作目录 = c:\ DebugTest 请参阅 加载进程远程选项卡

  11. 单击“加载”。可见断点立即被禁用,项目开始运行并打开 CPU 窗口并停止。按 f9 会使 exe 在远程计算机上完全运行,该按钮有效,但您无法调试它。

我尝试过各种“明显”的方法,例如关闭防火墙,但都无济于事。有好心人可以提出进一步的想法吗?

非常感谢。

I recently posted this question about my inability to get Delphi 2010 working with remote debugging. I have not had any success and decided to post up a simple step-by-step test technique that might highlight what I'm doing wrong. THIS IS REALLY IMPORTANT to me - I've used Delphi since V1.0 and earn my living from it. Being stuck like this is a pain and its keeping me on Delphi 7.

Anyway, here goes.

  1. Ensure that Delphi 2010 has updates 4&5.

  2. Fire up Delphi 2010, then File | New | VCL Forms App. Put a button on the form, put 'ShowMessage( 'hello' ) in the button OnClick event. Save the project and its unit in a local folder "C:\scratch". Build the project, run it, click the button, 'hello' appears, all fine.

  3. On a networked PC (194.168.1.64), create a new folder "c:\DebugTest" and share it with R/W access.

  4. On 194.168.1.64 install the Remote Debugger from the latest download on the Embarcadero Website (RemoteDebugger_upd2.exe). CLick rmtdbg140.exe to run. Accept the 'un-block' message from the firewall.

  5. Edit the DEBUG build configuration compiler settings with Output directory=\192.168.1.64\DebugTest and unit output directory = c:\scratch - see
    Compiler settings

  6. Edit the Linking settings to set Debug Information=True, Include remote debug symbols=True. See Linking settings

  7. Leave compiling settings at defaults. See Compiling settings

  8. Do a full build. The relevant project exe 'project2.exe' and 'project2.rsm' appear in the remote folder \192.168.1.64\DebugTest. Blue dots are visible in Unit2 in the IDE.

  9. Set a breakpoint on the 'ShowMessage' line (the button OnClick event).

  10. Use 'Run' | 'Load Process' with Remote path=c:\DebugTest\Project2.exe, Remote Host=192.168.1.64 and Working directory=c:\DebugTest see Load Process remote tab

  11. Click 'Load'. The visible breakpoint is immediately disabled, the project starts running and opens the CPU window and stops. Pressing f9 cause the exe to run fully on the remote machine, the button works, you just cannot debug it.

I've tried various 'obvious' things like firewall off but all to no avail. Could some kind person suggest further ideas?

Many thanks.

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

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

发布评论

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

评论(4

不知所踪 2024-10-24 14:04:31

好吧,对我来说,这个问题现在已经解决了,尽管作为一种“解决方法”,并且在与 Embarcadero 进行了大量交互并升级到 XE(也不起作用)之后。

远程调试器加载 rsm(远程符号)文件的能力似乎很不稳定(或者可能只是挑剔)——他们仍在调查为什么我的无法加载。我的 rsm 文件很大,大约 50Mb,尽管这对于 Delphi 7 的远程调试器来说不是问题。

解决方法包括升级到 Delphi XE,然后选择编译器链接选项“将调试信息放置在单独的 TDS 文件中”。这似乎在远程目标上创建一个 tds 文件而不是 rsm 文件,并且断点可以正常工作。

我已将 rsm 和 tds 文件提交给 Embarcadero,以调查发生这种情况的原因。

Well, for me the problem has now been solved, although as a 'work around' and after significant interaction with Embarcadero and an upgrade to XE (which also did not work).

It would appear that the remote debugger is flaky (or possibly just picky) in its ability to load rsm (remote symbols) files - they are still looking into why mine wont load. My rsm file is big at around 50Mb although this is no problem for Delphi 7's remote debugger.

The work around involved upgrading to Delphi XE and then choosing the compiler link option 'Place Debug Information in separate TDS file'. This seems to create a tds file onthe remote target instead of a rsm file and breakpoints then work fine.

I've submitted my rsm and tds files to Embarcadero for investigation as to why this happens.

枉心 2024-10-24 14:04:31

什么 Windows 操作系统?也许以管理员身份运行 rmtdbg140.exe。

我在 XP 和 XP 上运行 D2010 远程调试。我的操作方法位于 http://blog.runbits.com/post/Remote-debugging-Delphi。 ASPX

What Windows OS? Maybe run rmtdbg140.exe as admin.

I run D2010 remote debugging on XP versus XP. My How-To is at http://blog.runbits.com/post/Remote-debugging-Delphi.aspx

夜声 2024-10-24 14:04:31

我遇到了这个问题。安装 Delphi 2010 Update 4 解决了我的问题。它也被列在 Update 4 的已修复问题列表中。

I had this problem. Installing Update 4 for Delphi 2010 solved my problem. It is also listed in the list of fixed problems of Update 4.

甜妞爱困 2024-10-24 14:04:31

远程系统上必须有正确的时区和时钟。就我而言,我设置了远程调试,当我加载进程时,断点变成绿色。我检查了远程系统时区和时钟,将其设置正确,远程调试器再次工作。

It is imperative to have correct time zone and clock on remote system. In my case I set up remote debugging and when I load process the breakpoints turned green. I checked remote system timezone and clock, set it right and remote dubugger worked again.

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