Error: The Visual Studio Remote Debugger service on the target computer cannot connect back to this computer
Applies to: Visual Studio Visual Studio for Mac
Note
This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here
This error means that the remote debugger service is running under a user account that cannot authenticate when it tries to connect to the computer that you are debugging from. This error may occur when remote debugging using the legacy debugging engine, and the remote debugger is running as a service.
The following table shows what accounts can access the computer:
Scenario | LocalSystem account | Domain account | Local accounts that have the same username and password on both computers |
---|---|---|---|
Both computers on the same domain | Yes | Yes | Yes |
Both computers on domains that have two-way trust | No | No | Yes |
One or both computers on a workgroup | No | No | Yes |
Computers on different domains | No | No | Yes |
In addition:
The account you run the Visual Studio Remote Debugger service under should be an administrator on the remote computer so that it can debug any process.
The account also has to be granted the
Log on as a service
privilege on the remote computer that is using the Local Security Policy administrative tool.If you are using a local account access the computer, you must run the Visual Studio Remote Debugger service under a local account.
To correct this error
Make sure the Visual Studio Remote Debugger service is correctly set up on the remote computer. For more information, see Remote Debugging.
Run the remote debugger service under an account that can access the debugger host computer, as shown in the previous table.
To add "Log on as a service" privilege
On the Start menu, choose Control Panel.
In Control Panel, choose Classic View, if necessary.
Double-click Administrative Tools.
In the Administrative Tools window, double-click Local Security Policy.
In the Local Security Settings window, expand the Local Policies folder.
Click User Rights Assignment.
In the Policy column, double-click Log on as a service to view current local Group Policy assignments in the Log on as a service dialog box.
To add new users, click the Add User or Group button.
When you are finished adding users, click OK.
To work around this error
- Run the Remote Debugging Monitor as an application instead of a service.