[mapserver-users] Debugging a CGI in MSVC
Administrator
jnovak@novacell.com
Mon, 18 Nov 2002 21:07:59 -0800
This is a multi-part message in MIME format.
------_=_NextPart_001_01C28F89.A0CD276A
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Go to Project->Settings->Debug->General and place a string in the
Program Arguments box that resembles:
=20
QUERY_STRING=3Dmode=3Dbrowse&layer=3DDAWorks&zoomdir=3D0&zoomsize=3D2&img=
=3D..%2Ftmp
%2FDEMO10352555823296.png&imgxy=3D299.5+299.5&imgext=3D-175.552728+-160.5=
527
28+175.552728+190.552728&map=3DC%3A%5CInetpub%5Cwwwroot%5Cnovacell%5Cdemo=
.
map&savequery=3Dtrue&program=3D%5Ccgi-bin%5Cmapservercgi.exe&map_web_imag=
epa
th=3DC%3A%5Cinetpub%5Cwwwroot%5Ctmp%5C&map_web_imageurl=3D..%2Ftmp%2F&CMD=
=3DZO
OM_IN&INPUT_TYPE=3Dauto_rect&INPUT_COORD=3D73%2C224%3B213%2C300&minx=3D&m=
iny=3D&
maxx=3D&maxy=3D&imagewidth=3D&imageheight=3D
=20
I use a running web app to generate the string I wnat, then prepend the
QUERY_STRING=3D. This triggers a special debugging case in mapserv.c =
main
that will set up the CGI stuff for debug execution.
=20
JN
=20
From: Pradeep [mailto:pradeepkumar@infotech.stph.net]=20
Sent: Monday, November 18, 2002 8:33 PM
To: Mapserver-Users; mapserver-dev
Subject: [mapserver-users] Debugging a CGI in MSVC
Importance: High
Greetings
I have the mapserver sources running on windows,
compiled using the MSVC compiler,I wish to debug it, and follow the code
flow setting some break points in the code, as far as now I was
unsuccessful trying to debug the CGI exe, I have used __asm {int 3};
statement to programatically set break points in the code, but still the
VC debugger fails to launch. In essense can any user working in windows
environment tell me How to debug a CGI application?
=20
Thanks for your time
Pradeep.
=20
------_=_NextPart_001_01C28F89.A0CD276A
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR></HEAD>
<BODY style=3D"COLOR: #000000; FONT-FAMILY: Arial">
<DIV><SPAN class=3D668270505-19112002><FONT size=3D2>Go to=20
Project->Settings->Debug->General and place a string in the =
Program=20
Arguments box that resembles:</FONT></SPAN></DIV>
<DIV><SPAN class=3D668270505-19112002><FONT =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D668270505-19112002><FONT=20
size=3D2>QUERY_STRING=3Dmode=3Dbrowse&layer=3DDAWorks&zoomdir=3D0=
&zoomsize=3D2&img=3D..%2Ftmp%2FDEMO10352555823296.png&imgxy=3D=
299.5+299.5&imgext=3D-175.552728+-160.552728+175.552728+190.552728&am=
p;map=3DC%3A%5CInetpub%5Cwwwroot%5Cnovacell%5Cdemo.map&savequery=3Dtr=
ue&program=3D%5Ccgi-bin%5Cmapservercgi.exe&map_web_imagepath=3DC%=
3A%5Cinetpub%5Cwwwroot%5Ctmp%5C&map_web_imageurl=3D..%2Ftmp%2F&CM=
D=3DZOOM_IN&INPUT_TYPE=3Dauto_rect&INPUT_COORD=3D73%2C224%3B213%2=
C300&minx=3D&miny=3D&maxx=3D&maxy=3D&imagewidth=3D&am=
p;imageheight=3D</FONT></SPAN></DIV>
<DIV><SPAN class=3D668270505-19112002><FONT =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D668270505-19112002><FONT size=3D2>I use a running web =
app to=20
generate the string I wnat, then prepend the <SPAN=20
class=3D668270505-19112002><FONT size=3D2>QUERY_STRING=3D. This =
triggers a=20
special debugging case in mapserv.c main that will set up the CGI stuff =
for=20
debug execution.</FONT></SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=3D668270505-19112002><FONT size=3D2><SPAN=20
class=3D668270505-19112002></SPAN></FONT></SPAN> </DIV>
<DIV><SPAN class=3D668270505-19112002><FONT size=3D2><SPAN=20
class=3D668270505-19112002>JN</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=3D668270505-19112002><SPAN=20
class=3D668270505-19112002></SPAN></SPAN><FONT face=3DTahoma><FONT =
size=3D2><SPAN=20
class=3D668270505-19112002><FONT=20
face=3DArial> </FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT face=3DTahoma><FONT size=3D2><SPAN=20
class=3D668270505-19112002> </SPAN><STRONG>From:</STRONG> Pradeep=20
[mailto:pradeepkumar@infotech.stph.net] <BR><B>Sent:</B> Monday, =
November 18,=20
2002 8:33 PM<BR><B>To:</B> Mapserver-Users; =
mapserver-dev<BR><B>Subject:</B>=20
[mapserver-users] Debugging a CGI in MSVC<BR><B>Importance:</B>=20
High<BR><BR></DIV></FONT></FONT>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
<DIV><SPAN class=3D080452704-19112002><FONT =
size=3D2>Greetings</FONT></SPAN></DIV>
<DIV><SPAN =
class=3D080452704-19112002> =20
<FONT size=3D2>I have the mapserver sources running on windows, =
compiled using=20
the MSVC compiler,I wish to debug it, and follow the code flow setting =
some=20
break points in the code, as far as now I was unsuccessful trying to =
debug the=20
CGI exe, I have used __asm {int 3}; statement to programatically set =
break=20
points in the code, but still the VC debugger fails to launch. In =
essense can=20
any user working in windows environment tell me How to debug a CGI=20
application?</FONT></SPAN></DIV>
<DIV><SPAN class=3D080452704-19112002><FONT =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D080452704-19112002><FONT size=3D2>Thanks for your=20
time</FONT></SPAN></DIV>
<DIV><SPAN class=3D080452704-19112002><FONT =
size=3D2>Pradeep.</FONT></SPAN></DIV>
<DIV><SPAN=20
class=3D080452704-19112002></SPAN> </DIV></BLOCKQUOTE></BODY></HTML>=
=00
------_=_NextPart_001_01C28F89.A0CD276A--