In addition to debugging scripts and processes that are running on your computer, you can debug those that are running on another computer. This is referred to as remote debugging. In Microsoft® Visual InterDev™, remote debugging is useful for debugging server scripts running in ASP pages on Microsoft® Internet Information Server (IIS).
Ordinarily, to debug server script in an ASP page, you would have to install Visual InterDev on the server and then debug scripts locally on that server. However, with remote debugging, you can attach the debugger running on your computer to a script running on the server and issue debugging commands across the network.
Note If IIS and Visual InterDev are running on the same computer, you can debug server scripts using that copy of Visual InterDev, without remote debugging.
For the most part, remote debugging is similar to debugging locally, except for these differences:
The information below explains how to set up remote debugging, and then how to establish a remote debugging session.
To use remote debugging, you must perform several setup steps. The first step is to be sure that the proper debugging components have been installed on the server. A full server installation of the Visual InterDev will normally load the proper components. However, if you did not perform a full server installation, or if you are not sure, you can follow the procedure below.
To install debugging components on the server
To debug remotely, you must be able to provide the name and password of a Windows NT® user who has administration privileges for the server. All developers who will be using remote debugging should be established as administration-level users on the server computer. Use Windows NT facilities on the server to specify administration privileges for all users who will be debugging remotely.
Remote debugging uses Distributed COM (DCOM) to communicate between the client and server computers. You must therefore configure DCOM on the server to allow a remote user to attach the debugger to a process there.
To configure DCOM on the server for remote debugging
Verify that Allow Launch is selected in the Type of Access list, choose Add, and then add administrators as you did in Steps 4 through 6.
Before you can debug remotely, you must enable ASP debugging. You can manually enable debugging for your ASP application as described under "Enabling ASP Debugging on the Server" in the Troubleshooting topic. Alternatively, Visual InterDev can automatically enable debugging on the server as needed.
To automatically enable script debugging in ASP pages
When this option is set for your project, each time you start a debugging session, Visual InterDev checks that the server is appropriately configured for debugging. This includes:
Note You can perform the first two steps manually on the server. For details, see "Enabling ASP Debugging on the Server" in the Troubleshooting topic.
When you quit your debugging session, Visual InterDev restores the server debugging settings and out-of-process setting to their previous values.
After the server has been configured for remote debugging, you can debug on the server in much the same way you do locally.
Note It is highly recommended that you do not use Active Desktop mode of Microsoft® Internet Explorer 4.0 when you are debugging.
There are two ways to start remote debugging:
If you launch a project using the debugger, you can start debugging at the first line of script. Otherwise, you will only be able to debug script that runs after you attach to the process. In addition, if you launch a project, you will be able to edit the files you are debugging. When you attach to a process, you can see the files you are debugging, but cannot edit them there.
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.
You launch remote debugging from within Visual InterDev.
Note Before debugging server script, make sure you have enabled debugging as described above.
To launch a project using the debugger
Note If another user is already debugging on the server, Visual InterDev displays an error message and you will not be able to start the debugger.
Enter the domain and name (in the form domain\name) and password of a user with administrative privileges. For more details, see Setting Up Remote Debugging earlier in this topic.
If debugging is already enabled on the server for your project and you detect an error while the application is running, you can attach the debugger to it.
Note For information about setting server debugging options, see "Enabling ASP Debugging on the Server" in the Troubleshooting topic.
To attach to a running process
The process you selected appears in the Debugged Processes list.
You can step through scripts and test variables and expressions normally. However, to run a page you must navigate to it in your browser. In addition, you cannot edit the pages that you are debugging.