简体   繁体   中英

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. A small 'hello world' test project works fine. I've done the following:

  1. Created a VMWare Workstation virtual machine and installed Windows XP SP3.
  2. Installed and run paServer on XP.
  3. Created a new remote profile in Delphi XE2 pointing at the virtual machine.
  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.
  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.

I've tried various combinations of TDS file on/off, include debug systems Y/N all to no avail. 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. 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. I've now pasted in my massive project DPR into a new empty XE2 project thus creating a new DPROJ and lo! it stops at a breakpoint.

Wow these dproj's are a mess. 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. 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. The should be NO other Delphi output symbol or map files present.

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. My application sizes are also similar, with a 42MB .rsm and a 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. And my un-debuggable application as well went thru various Delphi upgrades during the last 10 years.

On my end deleting the .dproj, .dproj.local, .deployproj and reloading the .dpr however did not work. As suggested in similar threads, moving the debug information in a separate .tds file is not an option as this is a 64bit application.

I'm still looking for the root cause/solution, but in case anyone else has the same issue, they're not alone....

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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