Practical mod_perl / HTML Book /



previous page: 21.5.9. Interactive mod_perl Debugging
  
page up: HTML Version of the book
  
next page: 21.6. Analyzing Dumped core Files

21.5.9.1. ptkdb and interactive mod_perl debugging


As we saw earlier, we can use the ptkdb visual debugger to debug CGI scripts running under mod_cgi. At the time of writing it works partially under mod_perl as well. It hangs after the first run, so you have to kill it manually every time. Hopefully it will work completely with mod_perl in the future.

However, ptkdb won't work for mod_perl using the same configuration as used in mod_cgi. We have to tweak the Apache/DB.pm module to use Devel/ptkdb.pm instead of Apache/perl5db.pl.

Open the file in your favorite editor and replace:

require 'Apache/perl5db.pl';

with:

require Devel::ptkdb;

Now when you use the interactive mod_perl debugger configuration from the previous section and issue a request, the ptkdb visual debugger will be loaded.

If you are debugging Apache::Registryscripts, as in the terminal debugging mode example, go to line 140 (or to whatever line number at which the eval { &{$cv}($r, @_) } if $r->seqno;statement is located) and press the step in button to start debugging the script itself.

Note that you can use Apache with ptkdb in plain multi-server mode; you don't have to start httpd with the -X option.

 

Continue to:

  • prev: 21.5.9. Interactive mod_perl Debugging
  • Table of Contents
  • next: 21.6. Analyzing Dumped core Files







TOP
previous page: 21.5.9. Interactive mod_perl Debugging
  
page up: HTML Version of the book
  
next page: 21.6. Analyzing Dumped core Files


Menu

  • HTML Book
  • PDF Book
  • Download Code
  • Table of Contents
  • Errata
  • mod_perl2 User's Guide
  • Sitemap

Search


Add to Google




Creative Commons License


Written by
Eric Cholet (Logilune) and
Stas Bekman (StasoSphere & Free Books).


[ Privacy Policy | Terms of Use | About Us | Search ]

© 2007 StasoSphere.com