httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <>
Subject perldb
Date Fri, 17 Aug 2001 17:56:10 GMT
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
then you'll see:
GET http://localhost:8529/modules/cgi/ :
HTTP/1.1 500 Internal Server Error
Connection: close
Date: Fri, 17 Aug 2001 17:51:50 GMT
Server: Apache/2.0.25-dev (Unix) mod_ssl/3.0a0 OpenSSL/0.9.6 DAV/2
Content-Length: 536
Content-Type: text/html; charset=iso-8859-1
Client-Date: Fri, 17 Aug 2001 17:51:50 GMT
Title: 500 Internal Server Error

return code for 500, expecting: 500
222:        croak "ok: plan before you test!" if !$planned;

type 'c' at the prompt to continue on to the next test.

'perldoc perldebug' for more info on using the perl debugger.

View raw message