HOWTO: Debugging Active Server Pages Applications Manually

ID: Q196378


The information in this article applies to:


SUMMARY

In some situations users may want to manually enable debugging for their Active Server Pages (ASP) applications. In the following scenarios manually debugging is the only option:

Manually debugging ASP applications 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:
  1. Enables the IIS application's debugging options.


  2. Sets the IIS application to run in its own memory space.


  3. Creates a Microsoft Transaction Server (MTS) package and attaching to the Mtx.exe process.


  4. Sets the identity of the package to the user you specified when you started your first debugging session.


  5. Launches Internet Explorer and attaches to the Iexplore.exe process.


  6. After stopping the debugger Visual InterDev restores the server settings back to their original state.


Follow the steps below to manually enable debugging.

NOTE: When manually attaching to processes, you may either attach to the Inetinfo.exe or the Mtx.exe process. If you are debugging remotely or have set your Web application to run out-of-process, you will want to attach to the Mtx.exe process. If you are debugging locally and have not set your Web application to run out-of-process, then you will want to attach to the Inetinfo.exe process.


MORE INFORMATION

Configuring the Web Application for Attaching to the Inetinfo.exe Process

NOTE: Use this section if you are going to be attaching to the Inetinfo.exe process (Local debugging and running the application as in-process).

  1. Open the Internet Service Manager in the Microsoft Management Console (MMC).


  2. Display the Properties dialog box of the Web application you wish to remotely debug (right-click and select Properties).


  3. Click the Configuration button, and click the App Debugging tab.


  4. Select both the Enable ASP server-side script debugging and the Enable ASP client-side script debugging options and then click Apply.


Configuring the Web Application for Attaching to the Mtx.exe Process

NOTE: Use the next two sections if you are going to be attaching to the Mtx.exe process (Remotely debugging or running application as out-of- process).

  1. Open the Internet Service Manager in the MMC.


  2. Display the Properties dialog box of the Web application you wish to remotely debug (right-click and select Properties).


  3. On the Directory tab select the Run in separate memory space check box and then click Apply.


  4. Click the Configuration button, then click on the App Debugging tab.


  5. Select both the Enable ASP server-side script debugging and the Enable ASP client-side script debugging options and then click Apply.


Configuring Microsoft Transaction Server for Attaching to the Mtx.exe Process


  1. Open the Microsoft Transaction Server Explorer in the MMC.


  2. Under Microsoft Transaction Sever, Computers, My Computer, Packages Installed select the package for your Web application.


  3. Display the Properties dialog box for your Web application (right-click and select Properties).


  4. On the Identity tab, select This user and enter the account information that you will use for remotely debugging.


Attaching to a Process in Visual InterDev

  1. View the page you wish to debug in the browser.


  2. Open Visual InterDev.


  3. Select the Processes option under the Debug menu.


  4. In the Processes section, select the appropriate Machine then click Refresh. The available processes will appear in the Processes window.


  5. If you have set up the Web application to run Out-of-Process or are remotely debugging, you will want to attach to the Mtx.exe process. Otherwise, you will want to attach to the Inetinfo.exe process.


  6. Highlight the appropriate process and click Attach. The selected process should appear in the Debugged Processes window.


  7. Select the Debug Windows option under the View menu and then click Running Documents.


  8. Open the document from the Running Documents window and set a breakpoint.


  9. Refresh the page in the browser.


NOTE: When stopping the debugger, make sure to use the Detach all Processes option from the Debug menu or use the Detach button in the Processes dialog box. Using the Stop button or menu item could prevent the debugger from stopping properly.


REFERENCES

Please refer to the following Web site for related debugging articles:

http://msdn.microsoft.com/vinterdev/technical/articles/debug.asp

Additional query words:


Keywords          : kbDebug kbVisID600 kbGrpASP 
Version           : WINDOWS:6.0
Platform          : WINDOWS 
Issue type        : kbhowto 

Last Reviewed: July 21, 1999