Remote Debugging is not something that typically comes into play when working on standalone applications. Well, maybe that’s not entirely true. My first exposure to remote debugging actually came about during some driver development I did back in the day – debugging a BSODing driver is best from a remote machine (and nowadays from a VM host..)
However, in the ever expanding world of distributed systems development, remote debugging can be key when the application being debugged is just a single node in a distributed system.
When it works, remote debugging is amazing. Well, actually it’s exactly the same as debugging a local application, but given that the application is actually running on a remote machine, which does not need to even have Visual Studio installed, it’s pretty cool.
However, there are numerous gotchas to getting remote debugging to work, and by talking about the blogtitle error message, I am starting somewhere in the middle. The exact message is:
Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor named ‘….’. The Microsoft Visual Studio Remote Debugging Monitor on the remote computer cannot connect to the local computer. Unable to initiate DCOM communication. Please see Help for assistance.
‘…’ would be replaces by the IP address or machine name you are trying to debug.
So, at this point I am assuming that:
- Visual Studio remote debugged is actually in stalled on the remote machine
- Firewall is configured correctly – disabled is the best way to go for debugging remote debugging
- You have set up an account on the remote computer with the same user name and password as the account you are debugging from, and have given it proper (admin) privileges.
During a Remote Debug session, the remote computer instantiates a connection back to the computer that is debugging it. Thus, you need to have proper permissions for this “callback”.
To enable anonymous DCOM access:
Cross fingers, and try your Remote Debug session again.
Hope this helps, let me know if you find any other gotchas.