I'm trying to attach the Perl debugger to Apache and mod_perl. Our environment is quite complex (lots of additional stuff (eg Catalyst) configured with Apache) and the engineers who configured it are no longer with the company. I've followed the instructions on the Apache web site, setting 'PerlFixupHandler Apache::DB', etc. but so far all I get is a break into the debugger after the page has been delivered. I'm guessing that I get the break in the dispatch process, not the worker process. I'm running the prefork MPM version of Apache. The instructions for debugging say pass the -X parameter when starting httpd. But the httpd I'm running doesn't accept a -X parameter. I'm assuming the -X param would actually cause some versions of httpd to NOT fork?
Any and all guidance appreciated.
$ ./httpd -v
Server version: Apache/2.2.17 (Unix)
Server built: Nov 16 2010 20:13:24
-X isn't listed when I do httpd -?
Usage: ./httpd [-D name] [-d directory] [-f file]
[-C "directive"] [-c "directive"]
[-k start|restart|graceful|graceful-stop|stop]
[-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S]
$DB::single=1
) Or, try dumping the \%DB:: symbol table to see if the debugger is even loaded in the part of the process that generates the response? – Jansenismprint eval, "\n" while <>;
lines, which would drop you into a basic repl each time they are run. Type the commands you need, and then hit CTRL-D to end the while loop, and the code will run until the next time it hits a "breakpoint". Depending on where you place them, you might need to wrap the above with{local $_; ... }
to protect the$_
variable. – Totalizator-X
is not accepted. Every Apache httpd released in the last 10 years or longer has that feature. You must be doing something wrong. – Octagonal