Setting up Remote Debugging is usually a simple task, you can read the Set Up Remote Debugging guide on MSDN and you are ready to go, but sometimes it does not work and you are not able to connect to the remote process; in this post I want to give you some suggestions to troubleshoot the most common problem that you can encounter.
First: you need to be aware that Remote Debugging Managed Code is only available when you use the authenticated mode, if you run the remote debugger without authentication you can debug only Native Code, but the main problem is that usually the host and remote machine are not in the same Domain. To bypass this situation you need to create what is called “Shadow Account”, this means that you need to have in both machines the same user with the same password.
As you can see in Figure 1, I logged in the remote machine with the same user I’m logged in the host machine (the machine where I’m running Visual Studio), then I launch the remote debugger and configure to use Windows Authentication, you should also verify that current user has the Debug permission. As you can see from the description of the remote debugger is now operative and tells me: Msvsmon started a new server named gianmaria.ricci@WIN-FEVDGL2V37P. The part username@machinename is the name of the server.
Second: You need to be sure that the appropriate firewall ports are open in both machines, you can verify ports used if you launch the configuration of Remote Debugger, that tells you to open DCOM port (TCP 135) and IPSEC (UDP 4500 / UDP 500) if you run under IPSEC. If you still have problem to connect, you can try to disable the firewall on both machines, try to connect again, ad if it still does not work you probably have some authentication problem, so refer to first step and verify that you are logged in the remote machine with the same user you are using in the host machine. If you are able to connect with firewall disabled, turn on one debugger at a time (host and remote) and verify which is the one that is blocking the connection.
Read more: Alkampfer place
QR:
0 comments:
Post a Comment