如果用PWS 请看
This document describes how to debug ISAPI dll's
under Win98 using Microsoft Personal Web Server (PWS).
The directories referenced in this document assume a
default installation of PWS. You may have to change the
directories if you did not do a default installation.
1. First, create a shortcut to PWS.EXE. By default, it is located at:
"C:/WINDOWS/SYSTEM/inetsrv/pws.exe"
Right click on the new shortcut, and change the target to be:
"C:/WINDOWS/SYSTEM/inetsrv/pws.exe /stop"
This shortcut will allow you to stop PWS and unload
any dll's from memory that are currently being used.
2. In your Delphi ISAPI dll project, select "Run->Parameters" and set the host
application to be: "C:/WINDOWS/SYSTEM/inetsrv/inetinfo.exe"
and the parameters to be: "-e w3svc".
3. In your Delphi ISAPI dll project, go to "Project->Options..."
and on the "Directories/Conditionals" tab, set the
"Output Directory" to be "c:/inetpub/scripts" (or whatever your
scripts directory is).Now to actually be able to debug your dll, you must
first make sure PWS is not running. Right click on
the PWS icon in the system tray, and click "Stop Service".
The PWS icon should now have a red X on it. Now, double click
the shortcut that was made in step one to completely unload
PWS. It may take a couple of seconds, but the PWS icon should
disappear completely.You will now be able to set breakpoints in your ISAPI dll
project. Running your project will start PWS and place the
PWS icon in your system tray. Right click on and select
"Start Service". Access your ISAPI dll in a web browser by
typing in http://localhost/scripts/Project1.dll. Delphi should
now say "Running..." in the caption and will stop on breakpoints
in your DLL code.
After you have finished debugging, to return to Delphi you must
unload the dll. Right click on the PWS icon in the system tray
and click "Stop Service". Then, double click on the shortcut you
made in step 1. It may take a second, but Delphi will pop back up.
On a side note, I don't recommended using "Run->Program Reset (Ctrl-F2)"
while debugging ISAPI dll's under PWS. Quite often, this will cause
PWS to crash, and it will require a restart of your computer to allow
it to run again.