httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: perldb
Date Sat, 20 Oct 2001 04:58:33 GMT
Doug MacEachern wrote:

> to help with debugging tests, you can run under the perldebugger
> % t/TEST -v -d perl t/modules/cgi.t 
> ...
>   DB<1> lwpd 1
> will turn on debug mode so Apache::TestRequest prints the request method
> and url, along with the response headers from the server.  'lwp 2' does
> the same, but includes response body.  any non \d argument triggers a call
> to LWP::Debug::import, "lwp '+'" for example, see 'perldoc LWP::Debug' for
> more info on those options.
> i find it handy to set a breakpoint at 'ok', so the debugger stops each
> time a test happens:
>   DB<2> b ok
>   DB<3> c

that doesn't seem to work

% t/TEST -start
% t/TEST -v -d perl t/apache/read.t 
setting ulimit to allow core files
ulimit -c unlimited
 exec t/TEST -v -d perl t/apache/read.t

Loading DB routines from version 1.14
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

Apache::TestPerlDB added perldb commands:
   bok - Set breakpoint at test n
   lwpd - Set the LWP debug level for Apache::TestRequest
Debugged program terminated.  Use q to quit or R to restart,
  use O inhibit_exit to avoid stopping after program termination,
  h q, h R or h O to get additional info.  
  DB<1> lwpd 1
Undefined subroutine &Apache::TestRequest::lwp_debug called at ../Apache-Test/lib/Apache/
line 5.

  DB<2> b ok
Subroutine main::ok not found.


Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker      mod_perl Guide

View raw message