If you need to attach to a process from Visual Studio 2010 there is the obvious way to go via the Debug menu:
But as a dev you might want to avoid using the mouse as much as possible and therefore look for a shortcut for this. Although there is no explicit shortcut for that command, one can always operate the menu via Alt-shortcuts. Unfortunately, the shortcut P is used for two commands, not just for our “Attach to Process”, but also for “Import Data Tips” (who uses that?). So, that might be ambiguous.
BTW, there is also a similar issue on Microsoft Connect: http://connect.microsoft.com/VisualStudio/feedback/details/524763/vs-2010-attach-to-process-hotkey
Strangely, there is another menu containing the Attach to Process command, namely the Tools menu:
Funny as it is we see here, that in fact there is a shortcut attached to our desired command: Cltr+Alt+P.
Great and done? Not if you’re using ReSharper. Because Ctrl+Alt+P is ReSharper’s shortcut for the Introduce Parameter refactoring.
Looking to the command mappings for the shortcut, we see that the Visual Studio shortcut is defined for the global scope, while the ReSharper-shortcut is defined for the scope of the text editor:
That situation means that every time you have the input focus on any kind of text editor window (what you might have most of the time), the shortcut Ctrl+Alt+P will trigger ReSharper, but not Visual Studio Attacht to Process command.
Having understood that, it is obvious what to do: Just move the focus to some non text editor window and press the shortcut then. I prefer moving the focus to the solution explorer using Ctrl+Alt+L. Then, the key for P is next to no additional effort.
So, train your fingers to Ctrl+Alt+L, P for the Attach to Process command!
This is a typical situation where something looked just broken, but made totally sense when understood. So please, think twice before yelling out all too loud! :)
Awesome. Thank you. Saved me a headache.ReplyDelete
thank you so muchhhhReplyDelete
This comment has been removed by the author.ReplyDelete
The polygraph has somewhere around 4 and 6 sensors appended to it while the free end is connected to the talked with subject.www.liedetector.ukReplyDelete