Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Visual Studio
ASP.NET Debugging
 How to: Set Up Remote Debugging
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Visual Studio Debugger
How to: Set Up Remote Debugging

Updated: November 2007

This topic applies to:

Edition

Visual Basic

C#

C++

Web Developer

Express

Topic does not applyTopic does not applyTopic does not applyTopic does not apply

Standard

Topic does not applyTopic does not applyTopic does not applyTopic does not apply

Pro and Team

Topic appliesTopic appliesTopic appliesTopic does not apply

Table legend:

Topic applies

Applies

Topic does not apply

Does not apply

Topic applies but command hidden by default

Command or commands hidden by default.

To enable remote debugging, you can either:

  • Install the Remote Debugging Monitor (msvsmon.exe) on the remote computer and launch it when you start debugging, or

  • Run the Remote Debugging Monitor remotely from a share.

Running the Remote Debugging Monitor from a file share is the easiest way to enable remote debugging. Visual Studio installs msvsmon.exe into these directories:

Install path\Microsoft Visual Studio 8\Common7\IDE\Remote Debugger\x86

Install path\Microsoft Visual Studio 8\Common7\IDE\Remote Debugger\x64

Install path\Microsoft Visual Studio 8\Common7\IDE\Remote Debugger\ia64

The IA-64 components are available only with Visual Studio Team System.

When you install Visual Studio on a 64-bit platform, remote debugging components for both 64-bit and x86 are installed. When you install Visual Studio on an x86 platform, remote debugging components for x86 are installed by default; 64-bit debugging components are installed if you choose the appropriate option during installation.

When you install the Remote Debugging Monitor on an x86 platform, only the x86 remote debugging components are installed. There is no option for installing 64-bit components.

By sharing out the Remote Debugger directory on the Visual Studio computer, you can run msvsmon.exe on the remote computer. The following debugger features do not work when the Remote Debugging Monitor is run from a share:

  • Stepping into an XML Web service. (Manual attach is still possible.)

  • Automatically debugging an ASP.NET Web application. (Again, manual attach is still possible.)

As an alternative to running from a share, you can use the Visual Studio 2005 Remote Debugger CD to install the necessary remote debugging components on the remote computer. This installation provides access to all remote debugging features. When you run the Remote Debugger install on an x86 platform, only the x86 remote debugging components are installed. There is no option to install 64-bit components. If you run it on a 64-bit platform, both x86 and 64-bit components are installed.

For certain debugging scenarios, you must install additional components.

To install remote debugging components

  1. The remote debugger is available on the last disc of your Visual Studio installation set. Insert this disc on the remote computer. For example, if you have four discs in your installation set, insert disc four on the remote computer. If you have a DVD instead of a CD, insert the DVD.

  2. In Windows Explorer, open the CD/DVD. Locate the Remote Debugger folder (on the CD) or vs/Remote Debugger (on the DVD).

  3. In the Remote Debugger folder, open the subfolder that matches your platform (x86, x64, or IA-64).

  4. Start the copy of rdbgsetup.exe located in that subfolder and follow the instructions to complete setup.

    If you prefer, you can install the remote debugging components by copying the files manually. See Remote Debugging Components for a list of required components and their install locations. Visual Studio includes separate versions of Remote Debugging Monitor for 32-bit and 64-bit platforms. If you use rdbgsetup.exe, the Remote Components Setup will install the correct version of Remote Debugging Monitor automatically. If you choose to copy the files manually, you must make sure that you have copied the correct version.

  5. After you have installed the remote debugging components, you must make sure that you have the required permissions to debug a program on the remote computer. See Remote Debugging Permissions for a list of required permissions.

The Windows Firewall must be configured to enable remote debugging. When you start remote debugging for the first time, Visual Studio performs the necessary configuration on the Visual Studio host computer. Similarly, when you run the Remote Debugging Monitor on a remote computer for the first time, the Remote Debugging Monitor configures the Windows Firewall on that end.

On Windows XP, this configuration is completely transparent and automatic, but on Windows Vista, the new security model requires that you grant permission before the software can configure the firewall. This permission is granted through the User Account Control dialog box. For a description of the new security model and User Access Control, see The Windows Vista Security Model.

When the Remote Debugging Monitor has to configure the Windows Firewall on the remote computer, the User Access Control dialog box appears on the remote computer. If the remote computer is not visible, you may not realize that the UAC dialog box has appeared on its monitor. In that case, you may mistakenly believe that remote debugging has stopped responding. In reality, the Remote Debugging Monitor is merely waiting for someone to grant UAC permission on the remote computer.

One way to avoid this problem is to preconfigure the firewall on the remote computer by using the Remote Debugger Configuration Wizard.

It is highly unlikely that you will ever have to configure the Windows Firewall manually. If you do configure it manually, see How to: Manually Configure the Windows XP Firewall for Remote Debugging or How to: Manually Configure the Windows Vista Firewall for Remote Debugging.

To configure the Windows Firewall using the Remote Debugger Configuration Wizard

  1. Make sure remote debugging components have been installed on the computer.

  2. Click Start, point to All Programs, point to Visual Studio 9.0 and then click Visual Studio Remote Debugger Configuration Wizard.

  3. Click Start, point to All Programs, point to Visual Studio 9.0, and then click Remote Debugger.

  4. Follow the instructions in the Remote Debugger Configuration Wizard.

To enable Web server debugging on Windows Vista or Windows XP SP2

To Start Remote Debugging

  1. Make sure that you have the necessary remote debugging permissions on the remote computer. For more information, see Remote Debugging Permissions.

  2. For remote debugging other than SQL, make sure that you are running the Remote Debugging Monitor on the remote computer. For more information, see How to: Run the Remote Debugging Monitor. When you are debugging SQL, the Remote Debugging Monitor will launch automatically during debugging.

  3. Launch Visual Studio on the debugger host.

    Use Visual Studio to attach to a program that you want to debug on the remote computer or launch a program that you want to debug on the remote computer. For more information, see How to: Attach to a Running Process.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
You also need to have dcom enabled      Aaron Carlson ... brianjm   |   Edit   |  

DCom was disabled on my host machine which would result in a error.

This KB explains how to enable DCom.

http://support.microsoft.com/kb/313273

Tags What's this?: Add a tag
Flag as ContentBug
Typo on page      jerry goodwin   |   Edit   |  
The install paths to msvsmon.exe are wrong; the page is for VS 2008 (which is version 9.0). The paths should be:

Install path\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger\x86

Install path\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger\x64

Install path\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger\ia64

The paths in the page are correct for VS 2005 (which is version 8).

Wrong menu path      Alfred Myers   |   Edit   |  
To configure the Windows Firewall using the Remote Debugger Configuration Wizard, both Visual Studio Remote Debugger Configuration Wizard and Remote Debugger are located at All Programs -> Microsoft Visual Studio 2008 -> Visual Studio Tools instead of All Programs -> Visual Studio 9.0.
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker