Show: Delphi C++
Display Preferences

Attaching to a Running Process

From RAD Studio
Jump to: navigation, search

Go Up to How To Use the Debugger


You can attach to a process that is running on your local PC, on a remote PC, an OS X machine, or an iOS simulator running on a Mac. For example, attaching to a process can be useful for debugging a program that was not created with RAD Studio.

To attach to a running process

  1. Choose Run > Attach to Process to display the Attach to Process dialog box.
    By default, the Attach to Process dialog displays the processes running locally, for which the default debugger is the Embarcadero Win32 Debugger.
  2. Select the appropriate debugger from the Debugger drop-down list:
    Select this debugger If the process is ...

    Embarcadero Win32 Debugger

    Either:

    • A local 32-bit application
    • An app running on a remote 32-bit PC

    Embarcadero OS X Debugger

    Either:

    • A Mac OS X app
    • An iOS app running on an iOS simulator on a Mac

    Embarcadero Win64 Debugger

    A 64-bit Windows process, running either:

    • On your local 64-bit Windows development system
    • On a remote 64-bit Windows system
    You cannot select the following debuggers
    • Embarcadero iOS32 Device Debugger
    • Embarcadero iOS64 Device Debugger

    Does not support Attach to Process

    • Embarcadero Android Device Debugger

    Does not support Attach to Process

  3. Specify the Remote Machine where the process is running (either host name or IP address):
    For OS X and iOS:
    1. Click the ellipsis in the Remote Machine field, and select an existing connection profile or add a new connection profile on the Select Connection Profile dialog box.
    2. The Platform Assistant must be running on the Mac. These steps are required in order for you to use the integrated debugger in the IDE for debugging.
  4. The list of Running Processes is refreshed to display the processes running either locally or on the remote machine.
    • For multi-device processes, the selected debugger attempts to connect to the specified remote machine.
    • For OS X and iOS, if a connection profile does not exist for the specified remote machine, or if the Platform Assistant server is not running on the Mac, an error is displayed, "Unable to connect to remote host." To Create a Connection Profile or to select from existing connection profiles, click the ellipsis button [...].
  5. Select a process from the list of Running Processes.
  6. To include system processes in the list, check Show System Processes.
  7. If you do not want the process to pause after you have attached to it, uncheck Pause After Attach.
  8. Click Attach. The CPU Windows open.


Note: If you are using the old-style remote debugging solution, enter the name of the computer in the Remote Machine field. The remote debug server (file name rmtdbg260.exe for Win32) must be running on the remote computer. For more information, see Installing, Starting, and Stopping the Remote Debug Server.

See Also

Personal tools
In other languages
Previous Versions
Assistance