How to: Configure the Windows Vista Firewall for Remote Debugging
This topic applies to:
Edition |
Visual Basic |
C# |
F# |
C++ |
Web Developer |
---|---|---|---|---|---|
Express |
|||||
Pro, Premium, and Ultimate |
This topic describes how to configure the Windows firewall to enable remote debugging on computers that run on 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 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 with Advanced Security Page
To Configure the Visual Studio Host Firewall for Remote Debugging
To Configure the Firewall of the Remote Computer for Remote Debugging
How to Configure Ports in Windows Firewall
To Open the Windows Firewall
Windows Firewall with Advanced Security is a Microsoft Management Console snap-in that provides advanced options to control the Windows firewall. Do the following to open Windows Firewall with Advanced Security:
- Click Start, click Control Panel, click System and Maintainence, click Adminstrative Tools, and then click Windows Firewall with Advanced Security.
To Configure the Firewall on the Visual Studio Host Computer for Remote Debugging
To allow Visual Studio through Windows Firewall
On the Windows Firewall with Advanced Security page, select Inbound Rules from the console tree, and then click New Rule on the Action menu.
On the Rule Type page of the New Inbound Rule Wizard Windows Firewall Settings, click Add program.
On the Program page, select This program path and then type %ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe
On the Action page, select Allow the connection.
On the Profile page, select one or more network locations for which connections are allowed. The remote computer must be included in one of the locations.
On the Name page, type Microsoft Visual Studio 2010 in the Name box.
Ports to open on the Visual Studio computer to enable remote debugging
Use the procedure that is described in the section How to Configure Ports 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
On the Windows Firewall with Advanced Security page, select Inbound Rules from the console tree, and then click New Rule on the Action menu.
On the Rule Type page of the New Inbound Rule Wizard Windows Firewall Settings, click Add program.
On the Program page, select This program path and then 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 and then click Add.
On the Action page, select Allow the connection.
On the Profile page, select one or more network locations for which connections are allowed. The remote computer must be included in one of the locations.
On the Name page, type Microsoft Visual Studio Remote Debugging Monitor in the Name box.
Ports to open on the remote computer to enable remote debugging
Use the procedure that is described in the section How to Configure Ports in Windows Firewall to allow 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
On the Windows Firewall page, click Advanced Settings.
On the Windows Firewall with Advanced Security page, click Inbound Rules and then click New Rule in the Actions list.
On the Rule Type page of the New Inbound Rule Wizard, select Port and then click Next.
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 port numbers with a comma. Then click Next.
On the Action page of the wizard, select Allow the connection and then click Next.
On the Profile page of the wizard, check one or more network locations to enable for the port. The locations must include the remote computer to be debugged. Then click Next.
On the Name page of the wizard, enter a name for the port configuration, such as Visual Studio Remote Debugging TCP, and then click Finish.