Article ID: 908099 - Last Review: January 22, 2007 - Revision: 2.2 How to turn on remote debugging for Visual Studio 2005 in Windows XP with Service Pack 2NoticeMicrosoft now provides a tool that will do most of the required firewall configuration for you. For more information, click the following article number to view the article in the Microsoft Knowledge Base:841177
(http://support.microsoft.com/kb/841177/
)
Description of the DebuggerFirewall utility that makes the Visual Studio Remote Debugger work through the Windows XP Service Pack 2 firewall
On This PageSUMMARYThis article discusses how to turn on remote debugging for Microsoft Visual Studio 2005 in Microsoft Windows XP with Service Pack 2 (SP2). Windows Firewall replaces the Internet Connection Firewall (ICF) feature that is included in earlier versions of Windows XP. To turn on remote debugging for Visual Studio 2005, you may have to change the configuration of Windows Firewall. You may also have to open ports, configure DCOM settings, turn on file and print sharing, and add applications to the exceptions list on both the computer that is running Visual Studio 2005 and the remote computer. INTRODUCTIONThe Windows Firewall feature in Windows XP SP2 includes
significant enhancements over the earlier the Internet Connection Firewall
(ICF) feature. These enhancements help protect the computer from attack by
malicious users or by malicious software such as viruses. By default, Windows
Firewall is turned on for all network connections including connections to the
Internet. Turn on remote debuggingTo turn on remote debugging in Windows XP with SP2, you must configure Windows Firewall as follows:
Configure DCOM on the computer that is running Visual Studio 2005Note After you make changes by using the DCOM Configuration tool (Dcomcnfg.exe), you must restart the computer for the changes to take effect.
Remove and then re-install the MSDTC serviceIf you cannot click Configure My Computer that is described in step 3 in the "Configure DCOM on the computer that is running Visual Studio 2005" section, follow these steps.Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base: 322756
(http://support.microsoft.com/kb/322756/
)
How to back up and restore the registry in Windows
Configure the computer that is running Visual Studio 2005Open Windows FirewallTo open Windows Firewall, click Start, click Run, type firewall.cpl, and then click OK.Open TCP port 135DCOM remote procedure call (RPC) uses Transfer Control Protocol (TCP) port 135. If the application uses DCOM to communicate with remote computers, port 135 must be open.To open TCP port 135, follow these steps:
Open UDP port 4500User Datagram Protocol (UDP) port 4500 is used for Internet Protocol security (IPsec). If your domain policy requires that all network communication be completed through IPsec, this port must be open for any network operation. If your domain policy does not require IPsec, go to the "Turn on file and print sharing" section.To open UDP port 4500, follow these steps:
Open UDP port 500UDP port 500 is used for IPsec. If your domain policy requires that all network communication be completed through IPsec, this port must be open for any network operation. If your domain policy does not require IPsec, go to the "Turn on file and print sharing" section.To open UDP port 500, follow these steps:
Turn on file and print sharing
Add Devenv.exe to the application exceptions listTo enable applications that cannot run correctly unless the required ports are opened dynamically at runtime, you must add the applications to the application exceptions list.To add the Visual Studio 2005 Development Environment (Devenv.exe) to the application exceptions list, follow these steps:
Configure the remote computerAll the ports that you have opened on the debugger computer must also be open on the remote computer. To open the TCP 135 port, the UDP 4500 port, and the UDP 500 port, and to turn on file and print sharing, follow the steps in the "" section.You must also add the Msvsmon.exe file to the application exceptions list. Add MSVSMon.exe to the application exceptions list
Enable Web server debuggingHTTP uses TCP port 80. To do Web-based debugging, you must open TCP port 80. This is true for Microsoft ASP.NET debugging, for classic ASP debugging, and for ATL Server debugging.To open TCP port 80, follow these steps:
Enable script debuggingTo debug script code that runs on a remote computer, you must add the process that hosts the script code to the application exceptions list. Typically, in classic ASP debugging, the Dllhost.exe process or the Inetinfo.exe process hosts the script code. However, for a script that runs in Microsoft Internet Explorer, the Iexplore.exe process or in the Explorer.exe process generally hosts the script code.To add the process that hosts the script code to the application exceptions list, follow these steps:
Run the debugger as a typical userIf you want to run the debugger as a typical user, you must have full user rights to the folder where the executable files are located. Additionally, if you do not have Administrator user rights on the remote computer, you must have access permissions and start permissions to run the debugger as a typical user.Note A typical user is a user who does not have Administrator user rights. Note After you make changes by using the DCOM Configuration tool (Dcomcnfg.exe), you must restart the computer for the changes to take effect. To grant access permissions and start permissions, you must have Administrator user rights. First, obtain Administrator user rights. Then, follow these steps:
Remove and then re-install the MSDTC serviceIf you cannot click Configure My Computer that is described in step 3 in the "Run the debugger as a typical user" section, follow these steps.Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base: 322756
(http://support.microsoft.com/kb/322756/
)
How to back up and restore the registry in Windows
MORE INFORMATION For more information about Windows Firewall, click the following
article number to view the article in the Microsoft Knowledge Base: 843090
(http://support.microsoft.com/kb/843090/
)
Description of the Windows Firewall feature in Windows XP Service Pack 2
For more information about Windows XP SP2, visit the
following Microsoft Developer Network (MSDN) Web site:http://msdn2.microsoft.com/en-us/security/aa570371.aspx
(http://msdn2.microsoft.com/en-us/security/aa570371.aspx)
For
more information about remote debugging, click the following article number to
view the article in the Microsoft Knowledge Base: 833977
(http://support.microsoft.com/kb/833977/
)
How to turn on remote debugging in Windows XP with Service Pack 2
| Article Translations
|
Back to the top
