- Mastering Visual Studio 2017
- Kunal Chowdhury
- 237字
- 2025-04-04 18:47:05
Improved Attach to Process with process filtering
In the earlier versions of Visual Studio, it was quite difficult to search for a particular process in the Available Processes list of the Attach to Process dialog box. To overcome this, Microsoft has added a search box in the top-right corner of the list. It will help you filter the list and find out the exact process that you are looking for:

To help you further in this long process list, history entry has been added to the search box. When you are in this window at a later point of time, you can click on the arrowhead to select the last search item from the list.
A new entry labelled Reattach to Process... has been added to the Debug menu of Visual Studio 2017 to help you reattach to the process that you used last. Alternatively, you can press the keyboard shortcut, which is Shift + Alt + P, to directly attach the debugger to the last processes from the previous debugging session. This is shown in the following screenshot:

The debugger will first try to reattach to the process by matching the previous process ID, and then by matching to the previous process name. If no matches are found, or if there are multiple processes with the same name, the Attach to Process dialog will open to allow you to select the desired process from the list.