[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [help-cgicc] Debug / Release Problem

From: Robert A. Jenkin
Subject: RE: [help-cgicc] Debug / Release Problem
Date: Thu, 7 Nov 2002 10:05:46 -0500


The solution to this, as I have done with other CGI systems, is to write all 
information your CDI app receives during normal execution to a file. Then using 
a debug version bypass the cgi code when it is getting the environment values 
and have it get its values from the file you created from the first one. This 
approach, as I stated, works well with other CGI systems on Windows. 

I have yet to get 3.2.1 cgicc to even compile on windows let alone make such 
and enhancement to it.

I can send you work vb process to show the process if you like.

Robert jenkin

-----Original Message-----
From: address@hidden [mailto:address@hidden 
Sent: Thursday, November 07, 2002 9:24 AM
To: address@hidden
Subject: [help-cgicc] Debug / Release Problem

Well, what I want is to make my CGI application think it is running in a web
server environment, although I have called it from the command line, so I
can step through it and debug it.

So, instead of pointing my browser to
 I would like to call
scriptName.exe from the command line with whatever form of parameters.

So far I've tried using a batch file (I'm under W2K here...) that looks as

REM scriptName.bat
@echo off
set QUERY_STRING=param01=value01

Your solution also is a working approach, but it unfortunately has the same
problem as mine - it only works for up to one parameter. When I specify more
than one, I'd have to do something like this:

if (argc > 1)
   string strQueryString ("QUERY_STRING=");
   for (int i = 1; i < argc; i++)
      strQueryString += argv[i];
      strQueryString += " ";
   _putenv (strQueryString.c_str ());

and furthermore specify param01=value01 as 'program arguments' in the MSVC
project settings.

When I specify param01=value01 param02=value02 in the project settings (or
set QUERY_STRING=param01=value01 param02=value02
in the batch file, everything after 'param01=' is assigned to param01 and
param02 is empty -- apparently no matter what I use as separator. (besides the
space character used above, I tried all kinds of combinations of characters
that came to my mind...

I am actually rather surprised that I seem to be the first one to stumble
into that kind of problem. How is the debugging work done in your applications
?? Do they just run ?? And - come to think of it - how is the cgicc lib
itself debugged ?? 

Maybe someone has an idea...



> As for debugging your CGI as a stand alone app, I use this little trick
> for debug builds:
> #ifndef NDEBUG
>   if(argc>=2){
>     string str("QUERY_STRING=");
>     str+=argv[1];
>     _putenv(str.c_str());
>   }
> #endif
> ans run the app as a console program passing the parms via command line.
> Joaquín M López Muñoz
> Telefónica, Investigación y Desarrollo

+++ GMX - Mail, Messaging & more +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!

help-cgicc mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]