Question

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?

Was it helpful?

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.

OTHER TIPS

If you have newer versions of Delphi it comes with a built-in WebApp Debugger just for this purpose. If you have an older version of Delphi, try CGIExpert which was the best way to use CGI in Delphi.

This is not answering your question but might be helpful:

http://www.htmlhelp.org/tools/cg-eye/live.html

you pass the URL of your CGI and it sends values to it to detect problems.

You need a webserver for that. Once you loaded it into the webserver you can attach the Delphi debugger to it. Not exactly F9 and debug, but it works.

If you have build the CGI using Delphi's web-broker stuff you can also choose to make a Webapp Debugger which uses a small webserver for debug purpeses only. If you model your application right you can use the same code in both a real production CGI and a webapp debuger version to get the best of both worlds. See https://web.archive.org/web/1/http://articles.techrepublic%2ecom%2ecom/5100-10878_11-1050539.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top