Search code examples
delphidelphi-xe2breakpointsremote-debugging

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?


Solution

  • 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, i.e your project EXE with internal debugging. The should be NO other Delphi output symbol or map files present.