请问如何单步跟踪isapi程序?(100分)

  • 主题发起人 主题发起人 isabel
  • 开始时间 开始时间
I

isabel

Unregistered / Unconfirmed
GUEST, unregistred user!
我用delphi带的help提供的方法:在run时加run parameter
c:/winnt/system32/inetsrv/inerinfo.exe
-e wsrv
运行时会跳出一个debug窗口。里面是汇编,我可看不懂。
请问如何才能正常的调试isapi程序呢?
首先是如何才能将输出重定向到IE呢?
 
按F9继续,关掉cpu窗口,直接在你的源程序里面设置断点,
ie正常使用,到了断点自然就会断的
 
intrabob好像调试起来很方便
 
我调试时会遇到access violation的错误,而导致不能调试!!而实际上isapi的运行是正常的!?
 
在delphi技术内幕一书中有一个调试工具Intrabob.exe(3。0),使用起来非常简
单。
或者到www.drbob42.com上取下在一个。(5。0)
 
以前有人回答过这个问题的
 
to lodgue:
你好,我今天试图从www.drbob42.com下载intrabob.exe. 可是试了三次也没有成功。
请问你有没有intrabob.exe?如果有的话能不能发一个到我的信箱里?好象不很大,是吧。
谢谢!
 
如果用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.
 
<< delphi4 内幕>>书中有讲到,并在随书光盘有intrabob.exe.
 
to lodgue:
我用intrabob.exe,可是停不住呀。
我在第一个页面里需要用户输入用户名和密码。
在相应的action里设置断点,按下submit按扭没有
反映,须自己设置cgi option页中的pathinfo才行。
而且这时按下submit按扭后intrabob.exe便显示进站页面了。
断点根本就拦不住它!
怎么办?
 
多人接受答案了。
 
后退
顶部