Reputation: 30512
I'm setting up a Visual studio remote debugging session for a standard Windows Forms application written in C#.
On the Internet are a lot of stories about how to set up the remote computer and MSVCMON.EXE, but I can't find any stories about what to do on my computer to make sure that my program is debugged on the remote computer when I press START DEBUGGING.
So what should I do to make remote debugging possible?
Upvotes: 14
Views: 20802
Reputation: 30512
After some research I have found how to do it, even if you are working in a company that has a lot of safety issues with firewalls, etc. The only thing that I need from the IT department is administrator rights on both computers.
Prerequisites:
How to do it:
The msvsmon.exe program should now be waiting for new connections. The name of the server is something like "remote computer name" : "port number", for instance Prototype1:4016
.
Now on the local computer where you will develop your program using Visual Studio do the following:
\\Prototype1\Users\Harald\Documents\CameraTestProgram\
.Prototype1:4016
.This method works if you want to debug a normal Windows Forms application written in C#. I detected that it even works if you use unsafe code. There are some warnings though if your program contains C++ code, but they can be ignored.
Microsoft links for this (worked October 2013, and still in August 2015):
Microsoft description on how to setup remote debugging. This link does not work anymore on June 2017.
Microsoft: how to set up remote debugging. It worked in June 2017
Upvotes: 22