Compartilhar via


Remote Debugging Across Domains 

This topic applies to:

Visual Studio Edition

Visual Basic

C#

C++

J#

Web Dev

Express Edition

No

No

No

No

No

Standard Edition

No

No

No

No

No

Pro/Team Edition

Yes

Yes

Yes

Yes

Yes

Remote debugging involves two-way communication between the Visual Studio 2005 debugger and the Remote Debugging Monitor (msvsmon.exe). For remote debugging to work, it is important what user runs Visual Studio and also what user runs msvsmon.exe.

To connect to msvsmon, Visual Studio must be run as the same user running msvsmon or as an administrator. (You can also configure msvsmon to accept connections from other users.)

Visual Studio accepts connections from msvsmon if msvsmon is running as a user that can be authenticated on the Visual Studio computer. (The user must have a local account on the Visual Studio computer.)

With these restrictions, remote debugging works in a wide variety of scenarios, including:

  • Two domains without two-way trust

  • Two computers on a workgroup

  • One computer on a workgroup, and the other on a domain

  • Running the Remote debugging monitor (msvsmon) or Visual Studio as a local account

So, you need a local user account on each computer, with the same user name and password on each computer. If you need to run msvsmon as a different user than Visual Studio, then you need to have two user accounts on each computer.

A domain account can map to a local account. Therefore, you can run Visual Studio as a domain account if the domain account matches the name and password of a local account on each machine.

For Windows XP Professional machines on a workgroup, the local security setting may prevent remote debugging. The policy must be set to Classic for remote debugging to work. (This concern does not apply to computers running Windows 2000, Server 2003, or Windows XP computers that are joined to a domain.)

To change the security policy to allow remote debugging between domains (Windows XP Professional)

  1. On the local machine, choose Control Panel from the Start menu.

  2. In Control Panel, double-click Administrator tools.

  3. In the Administrative tools window, double-click Local Security Policy.

  4. Under Security Settings, open the Local Policies folder.

  5. In the Local Policies folder, select Security Options.

  6. In the Policy column, find Network access: sharing and security model for local accounts and double-click on it.

  7. In the Network access: sharing and security model for local accounts dialog box, change the setting from Guest only - local users authenticate as Guest to Classic - local users authenticate as themselves and click OK.

  8. Close the window and restart the machine.

  9. Repeat steps 1 to 8 on the Remote machine.

    You can now do remote debugging using the same user name on both machines.

See Also

Other Resources

Remote Debugging Setup