Visual Studio - Attach to process shortcut

The shortcut is Ctrl+Alt+P in Visual Studio 2005 and above.


The easiest way to do this is to write a macro which finds the DTE.LocalProcess you wan to target and automatically attach. For example

Public Sub AttachShortcut()
  For Each proc In DTE.Debugger.LocalProcesses 
    If proc.Name = "what you're looking for" Then
      proc.Attach()
      Exit Sub
    End IF
  Next
End Sub

Note: This Stack Overflow Question is related and has a sample you may find useful

  • Attaching to a child process automatically in Visual Studio during Debugging