简体   繁体   English

无法使用Windows XP SP3目标调试跨平台的大型delphi XE2应用程序

[英]Cannot debug large delphi XE2 application cross platform with Windows XP SP3 target

I've done my first setup of 'remote debugging' with XE2 (update 3) where I've taken my large 650k line app (which compiles and debugs fine in Win7) and found that breakpoints do not get hit in remote mode. 我用XE2(更新3)完成了“远程调试”的第一个设置,在那里我带了我的650k大型应用程序(在Win7中可以很好地进行编译和调试),发现断点在远程模式下不会命中。 A small 'hello world' test project works fine. 一个小的“ hello world”测试项目效果很好。 I've done the following: 我已经完成以下工作:

  1. Created a VMWare Workstation virtual machine and installed Windows XP SP3. 创建了VMWare Workstation虚拟机并安装了Windows XP SP3。
  2. Installed and run paServer on XP. 在XP上安装并运行paServer。
  3. Created a new remote profile in Delphi XE2 pointing at the virtual machine. 在Delphi XE2中创建了指向虚拟机的新远程配置文件。
  4. Clicked 'test connection' all is ok. 单击“测试连接”,一切正常。
  5. Right-clicked my usual 'debug' build configuration and assigned the new remote profile to it. 右键单击我通常的“调试”构建配置,然后为其分配新的远程配置文件。
  6. Set a breakpoint in the source. 在源中设置一个断点。
  7. Did a build and then run. 做一个构建,然后运行。 After finally seeing 'deploy' I see that the EXE and an RSM file are copied to a folder on the virtual machine. 最终看到“部署”之后,我看到EXE和RSM文件已复制到虚拟机上的文件夹中。
  8. The program runs on my virtual machine fine, but as soon as the run starts the breakpoint goes disabled and does not get hit. 该程序可以在我的虚拟机上正常运行,但是一旦开始运行,该断点将被禁用并且不会被命中。
  9. If I remove the remote profile and run the program locally, the breakpoint works fine. 如果删除远程配置文件并在本地运行程序,则断点可以正常工作。

As I say, a small project works ok. 正如我所说的,一个小项目行得通。 My RSM file is around 54M and the exe about 26M. 我的RSM文件约为54M,exe文件约为26M。

I've tried various combinations of TDS file on/off, include debug systems Y/N all to no avail. 我尝试了各种TDS文件开/关组合,包括调试系统Y / N,但都无济于事。 Is there some way I can find out why debugging is not available? 有什么办法可以找出为什么调试不可用?

I'm not in the habit of answering my own question but after more investigation there is some evidence that this may be due to the fact that my project (and it's DPROJ) have been through almost evey Delphi release since dproj's were introduced and that something inside it is affecting my ability to remote debug. 我不习惯回答自己的问题,但经过更多调查后,有一些证据表明,这可能是由于自引入dproj以来,我的项目(以及DPROJ)几乎已经通过了Delphi发行。内部影响了我的远程调试能力。 I noticed that in a simple new XE2 project certain items such as TDS file were greyed out where in my project they were not. 我注意到在一个简单的新XE2项目中,某些项目(例如TDS文件)会变灰,而在我的项目中则没有。 I've now pasted in my massive project DPR into a new empty XE2 project thus creating a new DPROJ and lo! 我现在将我的大型项目DPR粘贴到一个新的空XE2项目中,从而创建了一个新的DPROJ和lo! it stops at a breakpoint. 它在断点处停止。

Wow these dproj's are a mess. 哇,这些dproj很烂。 I'm used to editing the things to sort out version numbering that 'goes wrong' but I guess a clean one is needed from time to time. 我习惯于编辑这些东西以整理出“出错”的版本编号,但我想有时需要一个干净的版本号。

I'm trying not to get excited because I've seen remote debug flakiness before, but I just thought I'd post this info. 我试着不感到兴奋,因为我以前看过远程调试功能,但我只是想发布此信息。

[AFTER MORE WORK] It is essential to ensure that all spurious *.rsm, *.tds files are removed from the local output folder before the deployment manager copies file to the remote. [更多工作之后]在Deployment Manager将文件复制到远程之前,必须确保从本地输出文件夹中删除所有虚假的* .rsm,*。tds文件。 If you dont do this, remote debugging does not work. 如果不这样做,则远程调试将不起作用。 To check that all is ok, you see only ONE exe file on the target machine, ie your project EXE with internal debugging. 要检查一切正常,您只能在目标计算机上看到一个exe文件,即带有内部调试功能的项目EXE。 The should be NO other Delphi output symbol or map files present. 不应存在​​其他任何Delphi输出符号或映射文件。

I'm in the exact the same scenario as Brian, with the exception of the application being remotely debugged is on a Windows 2008 x64 server, debugged from an i386 XP SP3 running Delphi XE2. 我处于与Brian 完全相同的情况,只是要对应用程序进行远程调试是在Windows 2008 x64服​​务器上,该服务器是从运行Delphi XE2的i386 XP SP3调试的。 My application sizes are also similar, with a 42MB .rsm and a 28MB .exe. 我的应用程序大小也相似,分别为42MB .rsm和28MB .exe。 he application runs, but the breakpoints are not activated and show up in green while the application runs remotely. 应用程序将运行,但是在应用程序远程运行时,断点未激活,并以绿色显示。 Also just like Brian, I have no issues with the breakpoints when creating/remote debugging a new test x64 application created from scratch. 就像Brian一样,在创建/远程调试从头开始创建的新测试x64应用程序时,断点没有问题。 And my un-debuggable application as well went thru various Delphi upgrades during the last 10 years. 在过去的10年中,我不可调试的应用程序也经历了各种Delphi升级。

On my end deleting the .dproj, .dproj.local, .deployproj and reloading the .dpr however did not work. 最后,删除.dproj,.dproj.local,.deployproj并重新加载.dpr无效。 As suggested in similar threads, moving the debug information in a separate .tds file is not an option as this is a 64bit application. 正如在类似线程中所建议的那样,将调试信息移动到单独的.tds文件中不是一个选择,因为这是64位应用程序。

I'm still looking for the root cause/solution, but in case anyone else has the same issue, they're not alone.... 我仍在寻找根本原因/解决方案,但万一其他人遇到同样的问题,他们并不孤单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM