Debugging with Visual C++

If you are debugging a COM component that you have developed with Microsoft Visual C++ you should take the following steps.

  1. Access an .asp file that creates an instance of the COM component.
  2. Determine the Process ID of the process the .asp is running in. (See Note below.)
  3. Start the debugger by selecting it from the Build menu.
  4. Select Attach to Process.
  5. Select the Show System Processes box.
  6. Attach to the appropriate process.

If the application that the .asp file is running in has not been isolated, the process you should attach to is Inetinfo. If the application has been isolated the process will be an instance of mtx.exe. There may be multiple instances of mtx.exe, so you can use one of the two methods outlined below to identify the appropriate process to attach to.

If the web site is being hosted on a machine running Windows 2000 or later, or Windows NT 4.0 with Service Pack 4, you can use the Script Debugger to obtain the processID of the appropriate instance of mtx.exe. To do this, open the Script Debugger's Running Documents window. The root directory for each isolated application will be listed along with the processID of the appropriate instance of mtx.exe.

If the web site is being hosted on a machine running Windows NT 4.0 with Service Pack 3 or earlier, you will need to use a special utility to determine the processID. The IIS Resource Kit for IIS version 4.0 includes a utility called "GetPID" that you can use to identify the Process ID for an isolated application. In addition, the Windows 2000 Server Resource Kit includes a utility called tlist.exe that you can also use to determine the Process ID.