You must establish a TCP/IP connection between the local and remote machines in preparation for remote debugging. This connection uses multiple ports that are chosen dynamically by Windows. The remote debug server listens on one port, and a separate port is opened for each application that is being debugged. A firewall that only allows connections to the listening port will prevent the remote debugger from working.
Note: If the remote machine uses the firewall included with Windows XP service pack 2, you will receive a message asking whether CodeGear remote debugging service should be allowed. You must indicate that this is allowed.
Warning: The connection between RAD Studio and the remote debug server is a simple TCP/IP socket, with neither encryption nor authentication support. Therefore, the remote debug server should not be run on a computer that can be accessed over the network by untrusted clients.
To connect the local machine and the remote machine
- Ensure that the remote debugger is installed on the remote machine.
- Ensure that the executable files and symbol files (.tds. .rsm and .pdb) have been copied to the remote machine.
- On the remote machine, start rmtdbg105.exe with the -listen argument. rmtdbg105.exe -listen This starts the remote debugger's listener and directs it to wait for a connection from your host machine's IDE.
- On the local machine, choose RunAttach to Process. This displays the Attach to Process dialog.
- Specify the host name or TCP/IP address for the remote machine, then click Refresh. A list of processes running on the remote machine is displayed. This verifies the connectivity between the local and remote machines.
- On the local machine, choose RunLoad ProcessRemote. This displays the Remote page of the Load Process dialog.
- In the Remote path field, specify the full path for the directory on the remote machine into which you copied the executable files and symbol files. The name of the executable must be included. For example, if you are debugging a program1.exe, and you copy this to a directory named RemoteDebugFiles\Program1 on the remote machine, specify C:\RemoteDebugFiles\Program1\program1.exe.
- In the Remote host field, specify the host name or TCP/IP address for the remote machine.
- Click the Load button. This connects the IDE on the local machine to the debugger on the remote machine.
Once this connection is established, you can use the IDE on the local machine to debug the application as it runs on the remote machine.
Note: You cannot interact directly with the remote application through the remote debugger. For interactive debugging, you can establish a remote desktop connection.