Attach to a Process
Instead of having the profiler launch the process to profile, it is also possible to attach the profiler to an already running .NET Process.
In order to attach to a process, Debugging Tools for Windows must be installed on the computer. These tools can be downloaded from http://www.microsoft.com/whdc/devtools/debugging.
NOTE! On a 64-bit operating system, you will need to download the 32-bit debugging tools to attach to a 32-bit process and the 64-bit debugging tools to attach to a 64-bit process.
After the debugging tools have been installed, the following steps should be performed to attach the profiler to a running process:
1. Select the Attach 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.
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.
7. If Debugging Tools for Windows is not installed, the dialog below will appear, instructing you to install the debugging tools.