Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: (tye)Re2: Debugging a CGI

by toma (Vicar)
on Sep 06, 2001 at 12:11 UTC ( [id://110519]=note: print w/replies, xml ) Need Help??


in reply to (tye)Re2: Debugging a CGI
in thread Debugging a CGI

I tried adding the sleep command and your approach worked flawlessly! I was able to single step through my CGI program and see the output get rendered a piece at a time in the web browswer.

I should also mention that I figured out which TTY device to use running the tty command. In my case, this was pts/0. To open up the permissions on this tty I used chmod 777 /dev/pts/0, and in the cgi program the corresponding line is
$ENV{PERLDB_OPTS} = 'TTY=/dev/pts/0';

Using the text-based perl debugger reminded me why I like ptkdb so much! The ptkdb GUI is very intuitive, and I really have to struggle to do simple things in the text-mode debugger. This seems strange to me, since I normally don't have problems with text-based tools. I normally get bored with GUIs quickly and seek a text-based solution.

Even so, this is a valuable technique, especially for working across firewalls. I wonder if I could also somehow use ssh?

Thanks tye!

Update:Changed to a better way of determining which tty to use.

It should work perfectly the first time! - toma

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://110519]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-07-22 10:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.