launch perldb
Start Apache in single user mode with debugging flag
matt@vrip ~ 108> ./ad-talk/apache/bin/httpd -X -D PERLDB
[notice] Apache::DB initialized in child 1707
Debugger prompt will appear when request occurs
Loading DB routines from perl5db.pl version 1.19
Editor support available.
Enter h or `h h' for help, or `man perldebug' for more help.
Apache::Status::handler(/home/matt/ad-talk/perl/lib/site_perl/5.8.0/i686-linux/Apache/Status.pm:57):
57: my($r) = @_;
DB<1>
Debug just like you would ordinary perl
DB<1> n
Apache::Status::handler(/home/matt/ad-talk/perl/lib/site_perl/5.8.0/i686-linux/Apache/Status.pm:58):
58: Apache->request($r); #for Apache::CGI
DB<1> n
Apache::Status::handler(/home/matt/ad-talk/perl/lib/site_perl/5.8.0/i686-linux/Apache/Status.pm:59):
59: my $qs = $r->args || "";
DB<1> n
Apache::Status::handler(/home/matt/ad-talk/perl/lib/site_perl/5.8.0/i686-linux/Apache/Status.pm:60):
60: my $sub = "status_$qs";
[ etc etc ]
Notice that:
- content prints to screen as print statements are stepped through
- debugger hangs until next request, when prompt will re-appear and cycle repeats
To kill debugger:
Or if that doesn't work:
back | toc | next
(c) 2003 matt lanier, matt@lanier.org. Licensed under the same terms of perl itself