Visual Studio - "attach to particular instance of the process" macro

Posted by Steve on Stack Overflow See other posts from Stack Overflow or by Steve
Published on 2010-03-25T03:38:39Z Indexed on 2010/03/25 3:43 UTC
Read the original article Hit count: 380

I guess prety much everyone who does a lot of debugging have a handy macro in Visual Studio (with shortcut to it on a toolbar) which when called automatically attaches to a particular process (identified by name).

it saves a lot of time rather than clicking "Debug" -> "Attach to the process ...", but it only works if one is running a single instance of the process one wants to attach to. If theres is more than one instance of particular process in memory - the first one (with a smaller PID?) is being choose by debugger.

Does anyone have a macro which shows a dialog (if more that 1 process with a specified name running) and lets developer to select to one he/she really wants to attach to.

I guess the selection could be made based on a windwow caption text (which would be suffice in most of cases) and when the particular instance is selected macro passes the PID of the process to the Debugger object?

If someone has that macro or knows how to write it - please share.

Thanks.

© Stack Overflow or respective owner

Related posts about debugging

Related posts about visual-studio