Megosztás a következőn keresztül:


How to: Configure the Windows 7 Firewall for Remote Debugging

This topic applies to:

Edition

Visual Basic

C#

F#

C++

Web Developer

Express

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

Pro, Premium, and Ultimate

Topic applies Topic applies Topic applies Topic applies Topic applies

This topic describes how to configure the firewall to enable remote debugging on computers that run Windows 7, Windows Server 2008, or Windows Server 2008 R2. If the network on which you are debugging is not protected by a firewall, this configuration is unnecessary. Otherwise, both the computer that hosts Visual Studio and the remote computer that is to be debugged require configuration.

  • IPSec If your network requires that communication be performed using IPSec, you must open additional ports on both the Visual Studio host computer and the remote computer.

  • Web Server If you are debugging a remote Web server, you must open an additional port on the remote computer.

Note that both computers do not have to run the same operating system. For example, the Visual Studio host can run Windows 7 and the remote computer can run Windows Server 2003 SP2. See one of the following topics for other operating systems:

Operating system

Configuration topic

Windows Vista Service Pack 2

How to: Configure the Windows Vista Firewall for Remote Debugging

Windows XP Service Pack 3Windows Server 2003 SP2

How to: Configure the Windows XP Firewall for Remote Debugging

In This Topic

This topic contains the following sections:

To Open the Windows Firewall Page

To Configure the Visual Studio Host Firewall for Remote Computing

To Configure the Firewall of the Remote Computer for Remote Debugging

How to Configure Ports in Windows Firewall

To Open the Windows Firewall Page

  1. Click Start, click Control Panel, click System and Security, and then click Windows Firewall.

To Configure the Visual Studio Host Firewall for Remote Computing

To allow Visual Studio through Windows Firewall

  1. On the Windows Firewall page, click Allow a program or feature through Windows Firewall.

  2. In the Allowed Programs page, click Change Settings.

  3. If Microsoft Visual Studio 2010 is listed in the Allow programs and features list, do the following:

    1. Click Allow another program.

    2. In the Add a Program dialog box, select Microsoft Visual Studio 2010 and then click OK.

      Note

      If Microsoft Visual Studio 2010 is not listed, click Browse and navigate to %VSInstallDirectory%\Common7\IDE\devenv.exe. Then click Add.

  4. In the Allow programs and features list, select one or more network locations (Domain, Home/Work (Private), Public) that you want Visual Studio to communicate with. The locations must include the remote computer that you want to debug.

Ports to open on the Visual Studio computer to enable remote debugging

Use the procedure that is described in the section Configuring a Port in Windows Firewall to enable the following ports through Windows Firewall:

Ports

Protocol

135

TCP

Required

500, 4500

UDP

Required if your domain policy requires network communication to be performed through IPSec.

To Configure the Firewall of the Remote Computer for Remote Debugging

The remote debugging components can be installed on the remote computer or shared from the Visual Studio host computer. The firewall of the remote computer must be configured in both cases. The remote debugging components are located in one of the following folders:

  • %InstallOrSharedDrive%\Program Files (x64)\Microsoft Visual Studio 10.0\Common7\IDE\Remote Debugger folder on x64 computers.

  • %InstallOrSharedDrive%\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\Remote Debugger folder on x86 computers.

To allow the Remote Debugging Monitor through Windows Firewall

  1. On the Windows Firewall page, click Allow a program or feature through Windows Firewall.

  2. In the Allowed Programs page, click Change Settings.

  3. If Visual Studio Remote Debugging Monitor is not listed, in the Allow another program, do following:

    1. Click Allow another program.

    2. In the Add a Program dialog box, select Visual Studio Remote Debugging Monitor and then click OK.

      Note

      If Visual Studio Remote Debugging Monitor is not listed, click Browse and navigate to the installed or shared %VSInstallDirectory%\Common7\IDE\Remote Debugger. Navigate to the appropriate folder for the application (x86, x64, ia64) and then select msvsmon.exe. Then click Add.

  4. In the Allow programs and features list, select Visual Studio Remote Debugging Monitor and make sure that the left check box is selected.

  5. Check one or more network locations (Domain, Home/Work (Private), Public) that you want the remote debugging monitor to communicate with. The locations must include the Visual Studio host computer.

Ports on the remote computer to open to enable remote debugging

Use the procedure that is described in the section How to Configure Ports in Windows Firewall to enable the following ports through Windows Firewall:

Ports

Protocol

Description

135, 139, 445

TCP

Required

137, 138

UDP

Required

500, 4500

UDP

Required if your domain policy requires network communication to be performed through IPSec.

80

TCP

Required for Web Server debugging.

How to Configure Ports in Windows Firewall

  1. On the Windows Firewall page, click Advanced Settings.

  2. On the Windows Firewall with Advanced Security page, click Inbound Rules and then click New Rule in the Actions list.

  3. On the Rule Type page of the New Inbound Rule Wizard, select Port and then click Next.

  4. On the Protocol and Ports page of the wizard, select the protocol (TCP or UDP) that the port allows. Select Specific local ports and enter one or more port numbers that you want to enable for the protocol. Separate numbers with commas. Then click Next.

  5. On the Action page of the wizard, select Allow the connection and then click Next.

  6. On the Profile page of the wizard, select one or more network locations to enable for the port. The locations must include the remote computer to be debugged. Then click Next.

  7. On the Name page of the wizard, type a name for the port configuration, such as Visual Studio Remote Debugging TCP, and then click Finish.

See Also

Other Resources

How to: Set Up Remote Debugging

Remote Debugging Setup

Change History

Date

History

Reason

June 2011

Rewrote topic to simplify and highlight IPSec and Web server configuration.

Customer feedback.

Information enhancement.