Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automate "Attach to Process" in VS2005/2008

I was wondering if anyone knew of a macro or keyboard shortcut or anything really that would automate Attaching to a Process within visual studio?

like image 630
lomaxx Avatar asked Nov 19 '08 23:11

lomaxx


2 Answers

CTRL + ALT + P brings up the dialog box. Then hit the first letter of the process you want to attach to, e.g. W for w3wp.exe

like image 98
Greg Beech Avatar answered Sep 22 '22 23:09

Greg Beech


System.Diagnostics.Debugger.Break()

"If no debugger is attached, users are asked if they want to attach a debugger. If yes, the debugger is started. If a debugger is attached, the debugger is signaled with a user breakpoint event, and the debugger suspends execution of the process just as if a debugger breakpoint had been hit."

-- http://msdn.microsoft.com/en-us/library/system.diagnostics.debugger.break.aspx

like image 25
vfilby Avatar answered Sep 20 '22 23:09

vfilby