Search code examples
delphidebuggingcgiisapi

Best way to debug a Windows CGI


I have a Windows CGI created with Delphi 2007 using CGIExpert that I need to debug.

Is there any simply way to run it from within the IDE while passing parameters to it? I tried setting the Host Application to iexplore.exe (Run|Parameters) and entering some text on the Parameters field but it just can't seem to pass any parameters at runtime.

Anyone knows of a way so that I can run the cgi with some parameters from within Delphi IDE?


Solution

  • Something I have used to debug ISAPI based applications is idDebugger. While I haven't specifically tried it with a CGI application, it might be worth a look. The author specifically mentions the fact that it assists with CGI applications. The nice thing about this solution is that it makes debugging an ISAPI (and I suspect a CGI application) as easy as debugging a windows form based application...just set a few breakpoints and debug away.

    To use it, just set the working directory to the directory where your CGI/ISAPI executable is located, and set the host application to the idDebugger.exe file. Then set the parameters to the URL line (minus the http://localhost/) and your all set.