Popcorn Dave has asked for the wisdom of the Perl Monks concerning the following question:

Fellow monks,

I came across this code from Wicked Cool Perl Scripts that allows you to debug a CGI script using ptkdb , however the script is for Unix/Linux as it's talking about using an X11 server.

#!/usr/bin/perl -T # # Allows you to debug a script by starting the # interactive GUI debugger on your X screen. # use strict; use warnings; $ENV{DISPLAY} = ":0.0"; # Set the name of the display $ENV{PATH}="/bin:/usr/bin:/usr/X11R6/bin:"; system("/usr/bin/perl -T -d:ptkdb hello.pl");

Can anyone help modify this for use on a Windows system? Is it even possible? I like using ptkdb and being able to use it for tracing CGI would be great.

TIA!

Revolution. Today, 3 O'Clock. Meet behind the monkey bars.

Replies are listed 'Best First'.
Re: Debugging CGI scripts using ptkdb under Windows
by jdtoronto (Prior) on Aug 14, 2006 at 18:32 UTC
    There are a number X servers that run on Windows, one of the more popular around here is that which comes with CygWin. Of course the script does assume you are working on the same machine for both the web server and the X server.

    jdtoronto

      That's sort of what I was afraid of. I'm just running Apache on my windows box, so I was hoping there was something that was a native windows solution.

      Revolution. Today, 3 O'Clock. Meet behind the monkey bars.
Re: Debugging CGI scripts using ptkdb under Windows
by Anonymous Monk on Aug 15, 2006 at 09:48 UTC