Visual-studio – How to remote debug when user accounts do not match

debuggingremote-debuggingvisual studiovisual studio 2010visual-studio-2008

How can I configure Visual Studio remote debugging when:

  1. My developer machine is a member of an AD domain, and my username is "DevelopersName".
  2. The "remote" machine is on the same Ethernet segment, but is not part of the domain.
  3. The "remote" machine must run software under "RemoteUserName".

Most documentation I can find suggests that you need have both machines in the same domain and with identical usernames. That's not possible here.

I could possibly add my username to "remote", but the software still needs to run under "RemoteUserName.

If it helps, I could add 2nd network card to my developer machine and directly connect the "remote" machine.

Using VS2008, but will be moving soon to VS2010.

Thank you.

Best Answer

Sorry, but I've just spent the last 10 hours trying to debug your exact problem. My findings are not good.

You need to get your accounts synced, especially if you are using your remote app to connect to other systems in your SOA environment, ie: Sharepoint, AD.

You can to some extent get remote debugging to work, if you create an account on your local machine with the same name as that of your remote machine (lets do it like this rather rather than working with the domain account).

You then need to make sure the remote service is running under this account, and its a member of the administrators group. And by this I mean hold down control, and right click run as - with the remote debugger, and select the user (not required if remote server is logged in as the required user).

Run the wizard it will open the required ports, use Authentication, because non authentication won't debug managed code. Breakpoints are never met, and there is nothing you can do about this.

On your local dev machine, log off your domain account, and log onto the local account with matching name as the account on server thats running the remote service.

Now you stand a change of remote debugging. If you can't do any of the above, sorry there is no workaround, its entirely dependent on the user account and having the right permissions.