Developing Web Applications

Previous Topic Next Topic

Use Publishing Service to Start a Debugging Tool

If the debugging tool you are using is not capable of attaching to a Windows 2000 Server process, you will need to establish an appropriate debugging environment.

To start a debugging tool

  1. Right-click on My Computer and click Manage.
  2. Open the System Tools menu and click Services.
  3. Right-click IIS Admin Service and click the Logon tab.
  4. Select the Allow Service to Interact with Desktop check box and click OK.
  5. Repeat steps 2 and 3 for all processes that run under the IIS Admin process, for example, World Wide Web Publishing Service and FTP Publishing Service.
  6. Use the Registry Editor to add a subkey named “Inetinfo.Exe” to the following key:
    HKEY_LOCAL_MACHINE
    \Software
    \Microsoft
    \WindowsNT
    \CurrentVersion
    \Image File Execution Options key
  7. Add the following entry to this new key:
    Debugger = DebuggerExeName, where DebuggerExeName is the full path to the debugger you are using.

Caution   Do not use a registry editor to edit the registry directly unless you have no alternative. The registry editors bypass the standard safeguards provided by administrative tools. These safeguards prevent you from entering conflicting settings or settings that are likely to degrade performance or damage your system. Editing the registry directly can have serious, unexpected consequences that can prevent the system from starting and require that you reinstall Windows 2000. To configure or customize Windows 2000, use the programs in Control Panel or Microsoft® Management Console (MMC) whenever possible.

When the World Wide Web Publishing Service is started, your debugger will run as well. You can now set appropriate breakpoints in your ISAPI extension.

You won’t be able to set breakpoints in a component’s source code until the component has been loaded into memory. First, you will need to start Internet Explorer and view the ASP page containing the object. As soon as the page is loaded, you should be able to set breakpoints in your component. Click Refresh to view the page again, and trigger the breakpoints you selected. If the component cannot be loaded even once (for instance, if the fault occurs in component startup code), you will need to load the component DLL prior to starting the debugging session.


© 1997-1999 Microsoft Corporation. All rights reserved.