问题
I was wondering if it is possible to use the command window commands to attach to a remote process? (It gets very annoying for remote debugging to roll through the dialog steps every time.)
回答1:
I don't think there's any way to do what you want from the command line. But you should be able to eliminate at least some of the dialog steps.
For example, for C++, in the Project Properties find the Debugging Tab and change "Debugger to launch" to "Remote Windows Debugger". Now change Remote Command to the name of the process you want to attach to, change Remote Server Name to the relevant host name and change Attach to 'yes'. You can also set other properties as desired.
Press F5 (or Debug | Start) and you should end up attached to the process you identified on the remote server you identified.
来源:https://stackoverflow.com/questions/6443298/visual-studio-command-window-attach-to-remote-process