Remote debugging tip on Windows Server 2012 R2

As most of you know, my role primarily involves debugging and debugging a lot!  Most often I prefer Visual Studio debugger for debugging managed code.  That of course, if the problem I am trying to find the root-cause of is reproducible.  Well, if I don’t have that luxury, then there are other approaches (memory dumps etc.,).  But usually I believe (a very conservative estimate) 70% of problem scenarios could be (preferably) scaled down and replicated.  And with Visual Studio debugging, I often perform remote debugging as that enables me to setup my own AD, Exchange & SharePoint servers connected to it instead of tying them up with a corporate domain environment where there could be limitations (for e.g., difficulties to test with multiple user account, scenarios such as UPA sync could be restricted, DirSync type of thing cannot be done etc.,), you get the picture right?

So today I wanted to debug a process that was running on Windows Server 2012 R2 server.  I launched the remote debugger on the server from C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Remote Debugger\x64 by double-clicking msvsmon.exe.




Got back to my Windows 8.1 box where I have Visual Studio 2013 and tried to connect to the remote computer.  Connection was successful.  But when I tried attaching to a process on the remote server, I hit the below clear error.


This is despite the fact that I have set UAC to “Never notify” (Not recommended) setting.

To fix this problem, I simply launched msvsmon.exe as administrator and that fixed my problem.


Just thought of sharing this out as this really was not something I expected with UAC turned OFF.  And this never happens on my other boxes that are running Windows Server 2008 R2 (with UAC turned OFF).  And to also propagate this message “Trust the error message displayed, no matter whatever our human minds tell us based on our logical derivations from facts.” (not always true I understand, but this time it certainly was!).

Happy debugging!!!