Attaching to a running process

If you launch an application outside of the IDE on a target system, you can attach the Memory Analysis tool to one of its processes and view the process's memory data. To do so, you must run the application with Memory Analysis enabled, as explained in Launching from the command line with Memory Analysis.
To attach to a running process, you need to create a profile configuration as follows:
  1. If the Run menu doesn't include a Profile entry, add it like this:
    1. Select Customize Perspective from the Window menu.
    2. Select the Command Groups Availability tab.
    3. In the list of checkboxes, ensure that the Profile checkbox is enabled.
    4. Click OK.
  2. Select Run > Profile Configurations.
  3. Add the Memory Analysis tool to the configuration, as described in Steps 2 to 4 in Launching your program with Memory Analysis.
  4. In the Memory Analysis tab, configure the settings for your program as needed.

    You should ensure that the log file (or MALLOC_FILE) value, which you used when launching the process, is the same in the Advanced Settings section.

    For a reference of all UI fields you can set, see Configuring Memory Analysis sessions.

  5. Click Profile to launch the tool.
  6. In the Process Selection dialog, choose the target process you want to attach to and click OK.
The IDE creates a new Memory Analysis session. The new session is listed in the Session View and you can select it to view its data.