views:

288

answers:

2

I followed these instructions while trying to get remote debugging working with Delphi 2007. After completing all the steps, the remote debugger is half working.

It is able to launch and halt the application but the break points I set do not work. The automatic break point (at line Application.Initialize;) is working but it goes right to the CPU window. The debugging information appears to be missing.

I triple checked, both 'Include TD32 debug info' and 'Include remote debug symbols' are checked, a clean build was performed, and the correct files have been moved to the remote machine.

What am I missing?

Any help would be greatly appreciated.

+1  A: 

What are the correct files? I assume both the .exe and .rsm file?

(disclaimer: I only know remote debugging in D2009)

Marco van de Voort
thanks. No mention of the .rsm files in the article.
Lawrence Barsanti
I noted that some files installed by the remote debugger installer are older than those the latest 2007 update puts in the bin folder. It looks the remote debugger works better with the latest files.
ldsandon
+3  A: 

You might like to go through my own checkist for this, which is as follows. I hope its not too patronising, but there may be a step you've omitted. I also seem to recall that it was improtant to use IP addresses, not names. Also note that these instructions are for D7, howver I'm not aware that the principle has changed.

=======

In this description, TARGET refers to the machine being debugged (i.e the remote machine) and HOST refers to the machine being used fro debugging (i.e the local machine).

  1. If necessary, install the remote debugger on the target by copying the RDEBUG folder to the target and running SETUP.
  2. Run the remote debugger locally on the target using Start | Borland Remote Debugger | Remote debugger. A ‘spider’ icon should appear in the task bar. (It can be useful to double-click on this icon to obtain a connection status dialog – this shows how the local IDE is connecting to the remote in later steps here).
  3. On the host machine, explode the project to be debugged. Check that this compiles locally and runs offline.
  4. By convention, copy the SOFTWARE ROOT folder from the host to the target. This will be the working folder for the application when debugged. By copying the folder in its entirety, all support files will be found locally as needed. (This also fits nicely with using SecondCopy to duplicate the entire ART software tree on a remote machine and then to explode the required project – this will create the remote folder for you).
  5. In the Delphi IDE on the local machine, use Run | Parameters | Remote to set the Remote Path to the remote exe file in the folder you have just copied, as it will be visible on the target machine. If you’ve copied it as instructed in ‘4’, this path will be identical to the file that the local IDE would create and debug, eg “C:\Art_Soft\RT290\Bench\Dev4all\RT290w.exe”
  6. In the Delphi IDE on the local machine, use Run | Parameters | Remote to set Remote Host to the IP address of the target (you should use IPCONFIG on the target to find out what the IP address is). Before leaving the dialog, select ‘Debug Project On Remote Machine’.
  7. Enable “Include remote debug symbols” on the “EXE and DLL options” pane under Project|Options|Linker
  8. Compile and run the file from the IDE. The remote connection status should show connection progress and a the remote screen should show the application running.
Brian Frost
Very detailed. I'm sure this will help anyone who stumbles onto this question in the future.
Lawrence Barsanti