August 6th, 2024

Introducing the revamped Attach to Process experience

One of the most powerful and frequently used features of Visual Studio is the Attach to Process dialog, which enables you to debug processes running on your machine or on a remote machine. For anything you could develop using Visual Studio, the Attach to Process dialog allows you to quickly attach the debugger to the processes you want to inspect and troubleshoot. While this feature has been around for a long time, its current design has room for modernization to better fit the latest versions of Visual Studio. Thus, we used this opportunity to improve the Attach to Process experience introducing a revamped and refreshed UI. Along with the new UI, we also took some time to introduce additional features users had requested and improved performance and accessibility.

Side to side comparison between the new and the old Attach to process dialog UI.

The first thing you may notice is that the new UI visual style was updated to be consistent with the rest of Visual Studio, as well as supporting dark mode or any other VS theme you are using. The refreshed layout is not just about looks—it’s designed to save space and reduce clutter. This means you can easily find and select the processes you want to debug, even when working with smaller window sizes. It’s a cleaner, more intuitive experience that keeps everything you need within easy reach.

What’s new in the Attach to Process dialog?

Following are the new features and improvements to the dialog:

  • Theming support: The dialog now adapts to your preferred VS theme.

Image showing both the dark themed and light themed versions of the new dialog.

Image showing both the dark themed and light themed versions of the new dialog.

  • Decluttering: We revamped the view to reduce clutter and give back vertical space. This includes having the connection information hidden as a tooltip and having the Code Type be selected through a combo box in the dialog, instead of requiring a separate window like the old dialog did.

Image demonstrating that hovering over the information icon next to the Connection Type combo box will show the connection information on a tooltip.

  • Introduced Local and Remote connection types: We added a new “Local” only connection type that simplifies the view when only debugging processes on your own machine. The existing “Default” connection was renamed into “Remote (Windows)”, as the new default connection is the Local one.
  • Improved performance: Rendering time of both the tree view and flat view of the processes was improved. This should be especially noticeable for the tree view.
  • Collapsible items in the Tree view: The dialog now allows you to collapse child processes shown in the Tree view. Helping you reduce clutter.

Animation showing how to collapse child processes on the tree view.

  • Persistence of columns positions and widths on the processes list: The dialog now remembers the positions and widths of the columns on the processes list. This way you don’t have to adjust them every time you re-open VS.
  • Integrated “Track Window” experience: When selecting a process using the Track Window toggle, any window you selected will be highlighted on the processes list. Allowing you to see its information before deciding to attach, or you can attach directly to it though a double click.
  • Buffered Text Search: The dialog now lets you start typing the name of the process you are searching as soon as the dialog opens and even before the processes are loaded. The dialog will buffer your input and apply it as soon as the processes are available, saving you some time in your workflow.

Other changes:

    • The search now supports wildcards, hexadecimal search, property filters and multiple process search.

Image of the add search filter UI shown on the search box dropdown menu.

    • Process icons are shown on the lists. (Local connection only)

An icon next to the cmd.exe process name as shown in the processes list.

    • Preview of the selected processes. You can double click on it to scroll to the selected process on the list.

A view of the text box containing the selected processes names including their process id's

    • The last attached process name is shown on the reattach menu item. (Only on VS 17.11)

A view of the reattach to process menu item showing the reattach process name next to it. eg. Reattach to Notepad.exe

Try it out and let us know what you think

The new Attach to Process dialog is available in Visual Studio 2022 version 17.10 and later. You can access it from the Debug > Attach to Process menu or by pressing Ctrl+Alt+P. We hope you enjoy using it and find it more productive and pleasant than the old one. If you have any thoughts or suggestions, please share them with us on the Developer Community site or just leave a comment below. Your feedback is very important to us.

Stay connected with the Visual Studio team by following us on Twitter @VS_Debugger, Twitter @VisualStudio, YouTube, and LinkedIn.