The Visual InterDev debugger allows you to debug ASP scripts on remote IIS servers using a feature known as remote debugging. This feature is useful in several situations, for example when:
Normally, you will debug server script in an ASP page by installing Visual InterDev and the Web server on the same system and debugging scripts locally on that system. This is how we recommend you approach debugging, as we outlined earlier in this chapter.
However, with remote debugging, you can attach the debugger running on your computer to a script running on the Web server and issue debugging commands across the network. This is certainly useful in the situations we mentioned above. The material in this section is not meant to suggest that you do all of your debugging remotely, only that you know how to set up remote debugging and to use it when it's appropriate for the task.
Remote debugging is similar to debugging locally, except for these two differences:
Before you can use remote debugging, you set up the server running IIS. The first step is to be sure that the proper debugging components have been installed on the server. A full server installation of Visual InterDev will normally load the proper components. If you did not perform a full server installation, or if you are not sure that you did, you can follow these steps to update the server:
Remote debugging requires that anyone using this facility must have a valid Windows NT administration account. This account must be a member of the Administrators or Domain Admins groups. You can set this up with the NT User Manager utility. This step alone will give you pause about using Remote Debugging on a production server. If you either do not want to or cannot use this level of security, you can use a tool like PCAnyWhere32 on Windows NT to allow certain users to remotely access a copy of Visual InterDev running on the IIS server. This will not require the same security levels that remote debugging does.
The remote debugging process uses Distributed COM (DCOM) to communicate between the client and server computers. You must configure DCOM on the IIS server to allow a remote user to attach the debugger process on that server:
Now you can debug the application remotely using Visual InterDev just as you would if Visual InterDev and IIS were running on the same system.
After the server has been configured for remote debugging, you can debug on the server in much the same way you do locally. You can launch a remote debugging session in the same way that you launch a normal debugging session:
The debug process runs on the server the ASP application runs on. For instance, if your ASP application is running locally, your debug session will also run locally. If the ASP application is running on another server, the debug session will run on that server.
NOTE
Because remote debugging ties up process threads on the server, it is recommended that while a remote debugging session is in progress, other users avoid using the server.