In some cases, users want to manually enable Visual InterDev debugging for their Active Server Pages (ASP) Web applications. In the following scenarios, manual debugging is the only option:
Debug an ASP Web application that is running on a port other than 80.
Debug an ASP Web application that resides on a FAT file system.
Debug an ASP Web application that resides on a virtual server that is using host header names.
Your development computer is not on the same domain as the Web server, or you are not using a domain-authenticated account.
Debug remotely from a Windows NT 4.0 client to a Windows 2000 Web server.
Note If you manually debug remotely from a Windows 2000 client to a Windows NT 4.0 Web server, see the following Microsoft Knowledge Base article:
196378
(http://support.microsoft.com/kb/196378/
)
How To Debug ASP applications manually against Windows NT 4.0 Web Server
If you manually debug ASP applications, you can improve productivity because you do not rely on Visual InterDev to automatically set the server into the correct debugging state. Visual InterDev performs the following steps when setting up the server:
Enables the debugging options of the Web application.
Sets the Application Protection setting of the Web application to High (Isolated).
Creates a Microsoft COM+ application package and attaches to the Dllhost.exe process.
Sets the identity of the package to the user who you specified when you
started your first debugging session.
Launches Internet Explorer and attaches to the Iexplore.exe process.
Stops the debugger, and then restores the server settings back to their original state.
Use the following method to manually enable debugging.
Note When you manually attach to processes, you can either attach to the Inetinfo.exe or the Dllhost.exe process. If you debug remotely or have set the Application Protection setting of your Web application to High or Medium, attach to the Dllhost.exe process. If you want to debug locally and have set your Web application to Low, attach to the Inetinfo.exe process.
Configure the Web application to attach to the Inetinfo.exe process
Note Use this method if you are going to attach to the Inetinfo.exe process (local debugging with the Application Protection setting of the Web application to Low [IIS Process]).
Open the Internet Service Manager.
Right-click the Web application that you want to locally debug, and then click Properties.
Click Configuration, and then click the App Debugging tab.
Click to select both Enable ASP server-side script debugging and Enable ASP client-side script debugging, and then click Apply.
Configure the Web application to attach to the Dllhost.exe process
Note Use the next two methods if you want to attach to the Dllhost.exe process (remotely debug with the Application Protection setting of the Web application at High or Medium).
Open the Internet Service Manager.
Right-click the Web application that you want to remotely debug, and then click Properties.
Click the Directory tab, and then set the Application Protection setting to either High (Isolated) or Medium (Pooled), and then click Apply.
Click Configuration, and then click the App Debugging tab.
Click to select both Enable ASP server-side script debugging and Enable ASP client-side script debugging, and then click Apply.
Configure COM+ to attach to the Dllhost.exe process
Open the Component Services console.
Expand Component Services, expand Computers, expand My Computer, expand COM+ Applications, and then click the COM+ application package for your Web application.
Note If you have set the Application Protection setting to Medium, you will configure the following COM+ application package:
IIS Out-Of-Process Pooled Applications
Open the Properties dialog box for your Web application.
On the Identity tab, click This user, and then enter the account information that you will use for remotely debugging.
Attach to a process in Visual InterDev
View the page that you want to debug in the browser.
Open Visual InterDev.
On the Debug menu, click Processes.
In the Processes section of the modal dialog box that appears, click the appropriate Machine, and then click Refresh. The list of available processes appears.
If you have set the Application Protection setting of the Web application to High or Medium, attach to the Dllhost.exe process. Otherwise, attach to the Inetinfo.exe process.
Select the appropriate process, and then click Attach. The selected process appears in the Debugged Processes dialog box.
On the View menu, point to Debug Windows, and then click Running Documents.
Open the document from the Running Documents window, and then set a breakpoint.
Refresh the page in the browser.
Note When you stop the debugger, make sure to use the Detach All
Processes menu option on the Debug menu or the Detach button in the Processes dialog box. If you use the Stop button or menu item, the debugger may not stop correctly.