Bagikan melalui


How to: Configure the Windows XP 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 Windows firewall to enable remote debugging on computers that run the Windows Vista Service Pack 2 operating system. 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 Vista SP2. See one of the following topics for other operating systems:

Operating system

Configuration topic

Windows 7Windows Server 2008Windows Server 2008 R2

How to: Configure the Windows 7 Firewall for Remote Debugging

Windows Vista Service Pack 2

How to: Configure the Windows Vista Firewall for Remote Debugging

In This Topic

This topic contains the following sections:

To Open the Windows Firewall Dialog Box

To Configure the Firewall on the Visual Studio Host Computer for Remote Debugging

To Configure the Firewall of the Remote Computer for Remote Debugging

How to Configure a Port in Windows Firewall

To Open the Windows Firewall Dialog Box

To open the Windows Firewall dialog box:

  • Click Start, click Control Panel, click Security Center and then click Windows Firewall.

To Configure the Firewall on the Visual Studio Host Computer for Remote Debugging

To allow Visual Studio through Windows Firewall

  1. On the Windows Firewall dialog box, click the Exceptions tab.

  2. Click Add Program.

  3. On the Add a Program dialog box, do one of the following:

    1. If Microsoft Visual Studio 2010 is displayed in the Programs list, select it.

    2. If Microsoft Visual Studio 2010 is not listed, click Browse and navigate to %ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE where %ProgramFiles% is the 32 bit Program Files folder. Then select devenv.exe.

  4. On the Add a Program dialog box, click Change scope and specify the network locations with which you want Visual Studio to communicate. The remote computer that you want to debug must be at one of these locations.

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

Use the procedure described in the section How to Configure a Port in Windows Firewall to allow 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 on the Remote Computer for Remote Debugging

To allow the Remote Debugging Monitor through Windows Firewall

  1. On the Windows Firewall dialog box, click the Exceptions tab.

  2. Click Add a program.

  3. Do one of the following:

    1. If the version of the Remote Debugging Monitor is displayed in the Programs list, select it.

    2. If the monitor is not listed, click Browse. Navigate to the installed or shared folder that contains the Remote Debugging Monitor (msvsmon.exe) that is appropriate for the application you want to debug. For example, the installed location is a subfolder of %ProgramFiles%Microsoft Visual Studio 10.0\Common7\IDE\Remote Debugger where %ProgramFiles% is the 32-bit Program Files folder. The subfolders (x86, x64, ia64) identify the application type that you want to debug. Select msvsmon.exe.

  4. On the Add a Program dialog box, click Change scope and specify the network locations with which you want the Remote Debugging Monitor to communicate. The Visual Studio host computer must be at one of these locations.

Ports to open on the remote computer to enable remote debugging

For each port that is required in the following list, use the procedure described in the section How to Configure Ports in Windows Firewall to allow the port 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 a Port in Windows Firewall

For each port that you want, follow these steps:

  1. On the Windows Firewall dialog box, click the Exceptions tab.

  2. Click Add Port.

  3. On the Add a Port dialog box, type a name to identify the port rule in the Name box, for example, Remote Debugging Monitor TCP 1.

  4. Type the port number in the Port Number box.

  5. Select the protocol that the port should use (TCP or UDP.)

  6. Click Change scope and specify the network locations with which you want the port to communicate.

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.