How to remote debug when user accounts do not match?

How to set up Visual Studio remote debugging when:

  • My developer machine is a member of the AD domain, and my username is "DevelopersName".
  • The “remote” machine is on the same Ethernet segment but is not part of a domain.
  • The “remote” machine should run the software under the name “RemoteUserName”.

The large documentation I can find suggests that you need to have both machines in the same domain and with identical usernames. It's impossible.

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

If this helps, I can add a second network card to my development machine and directly connect the "remote" machine.

Using VS2008, but will be moving towards VS2010 soon.

Thanks.

+4
source share
3 answers

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

You need to synchronize your accounts, especially if you use your remote application to connect to other systems in your SOA environment, that is: Sharepoint, AD.

To some extent, you can get a remote debugging action if you create an account on your local computer with the same name as on your remote computer (instead, you do this sooner rather than working with a domain account).

Then you need to make sure that the remote service is running in this account and its member of the administrators group. And by this I mean to keep control, and the right click starts as - with the remote debugger and selects the user (not required if the remote server is registered as the required user).

Run the wizard, it will open the necessary ports, use Authentication, because non-authentication will not debug managed code. Breakpoints never occur, and there is nothing you can do about it.

On your local development machine, log out of the domain account and log in to the local account with the appropriate name as the account on the server running the remote service.

You are now standing by changing the remote debugging. If you cannot do any of the above, I'm sorry, there is no workaround, it depends entirely on the user account and has access rights.

+6
source

If you do not want to create a local account, try starting our debugger using the command line using the following command:

runas /user:[ user@machinename ] /netonly [debugger.exe] 

eg:.

  runas /user: john@mypc123 /netonly devenv.exe 
+2
source

I assume that it controlled the debugging you are talking about (there is a remote debugging solution without authentication for your own debugging). In this case, I suggest you use a local user to run the debugger on your computer. If this local username and password match the username and password "RemoteUserName", it should work.

(Note: this does not prevent you from using the AD account to log into your workstation, you just need to set up another account and use runas to start Visual Studio.)

+1
source

Source: https://habr.com/ru/post/1336497/


All Articles