Attach to a Process

(Professional and Enterprise only)

Instead of having the profiler launch the process to profile, it is also possible to attach the profiler to an already running .NET Process.

There are two ways of attaching to a process: Attach using profiling API and Inspection only attach. Attach using profiling API allows object instances to be tracked between snapshots, which allows the profiler identify new and removed instances, which makes it easier to identify memory leaks. However, when using the profiler API, the profiler will be loaded into the process and this will affect the performance and memory usage of the profiler process. Inspection only attach on the other hand, only inspects the profiled process by investigating the memory in the process. This has the advantage that the profiled process is not affected by the profiler, but the profiler cannot track instances and how they are moved by the garbage collector.

For more information about profiling API attach, see Attach to Process using Profiling API.

The following steps should be performed to attach the profiler to a running process:

1.  Select the AttachToAttach to Process command from the File menu or Attach Profiler to Process from the Profiler menu if running under Visual Studio.

2.  The “Attach to” wizard appears.

3.  Select the process you want to attach to from the list of .NET processes and whether the process should be attached using the profiling API or using inspection only attach.

4.  If you want to profile using the default settings, click Start to start the application.

5.  If you want to modify settings, you can use the Next button to modify some common settings.

6.  When you have decided on the settings, click Start to attach to the process.

.NET Memory Profiler User Manual

© Copyright 2002-2019. SciTech Software AB.

For information about .NET Memory Profiler, see the product site at

.NET Memory Profiler is developed by SciTech Software AB