Background
I have a macro AttachToRemoteProcess
that I use to attach the debugger to a running process on a remote computer. The macro use hard coded names for the process and the computer. I use the macro from a toolbar button on a custom toolbar. I consider this a sub par solution and I don't really like to have such a macro in my Visual Studio environment since it only works for the specific program/environment it was hard coded for.
I am using Visual Studio 2008.
Solutions
I can imagine two solutions but I do not know if they are possible to implement.
Alternative 1
I would like to either have the macro AttachToRemoteProcess
being part of the solution (.sln) or one of the projects (.csproj) and have the toolbar appear when the solution or project has been loaded into Visual Studio. In this case it is OK to have hard coded settings such as process and computer name.
Alternative 2
- The macro
AttachToRemoteProcess
is made reusable by taking process and computer as parameters. - The custom toolbar, button and the macro are always available in Visual Studio. This is just like my current solution, except for the parameterized macro.
- When the button is clicked the computer name and process name is looked up from somewhere in the solution or the current project.
Questions
- Would any of the alternative work and how can I go about doing it?
- Are there any other alternative solutions for what I want to achieve?