Establishing a Connection for Remote Debugging

From RAD Studio
Jump to: navigation, search

Go Up to Remote Debugging - Old-Style Procedures

Note: This topic describes how to establish a connection for running the old-style remote debugger.
Note: Although the old-style remote debugging solution is still supported, we recommend that you use the new remote and multi-device debugging solution which enables you to:

  • Use the integrated debugger to debug remote and multi-device applications.
  • Use the Deployment Manager to configure and deploy your applications.

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 Windows firewall, you will receive a message asking whether Embarcadero 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

  1. Ensure that the remote debugger is installed on the remote machine. See Installing a Debugger on a Remote Machine.
  2. Ensure that the executable files and symbol files (.rsm, .tds) have been copied to the remote machine. See Installing a Debugger on a Remote Machine .
  3. On the remote machine, start rmtdbg220.exe with the -listen argument.
    rmtdbg220.exe -listen
    This starts the remote debugger's listener and directs it to wait for a connection from your host machine's IDE.
  4. On the local machine, choose Run > Attach to Process. This displays the Attach to Process dialog.
  5. 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.
  6. On the local machine, choose Run > Load Process > Remote . This displays the Load Process Remote page.
  7. 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:
  8. In the Remote host field, specify the host name or TCP/IP address for the remote machine.
  9. Click the Load button. This connects the IDE on the local machine to the debugger on the remote machine.

After 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 can neither see your remote application on the local machine, nor interact with it directly from the local machine, using only the Remote Debugger. For interactive debugging, establish a Remote Desktop Connection using any available remote-desktop software package, including those built into Windows (Remote Desktop) or other third-party remote-control software such as VNC or PC-Anywhere. For more information, see Local and Remote Machines.

See Also