Unattended Execution
During startup, options are initialized from
$ENV{PERLDB_OPTS}
. You may place the initialization
options TTY
, noTTY
,
ReadLine
, and NonStop
there.
If your init file contains:
parse_options("NonStop=1 LineInfo=tperl.out AutoTrace");
then your program will run without human intervention, putting
trace information into the file db.out. (If you
interrupt it, you'd better reset LineInfo
to
/dev/tty if you expect to see anything.)
The following options can be specified only at startup. To set
them in your init file, call
parse_options(
"OPT
=
VAL
")
.
TTY
The terminal to use for debugging I/O.
noTTY
If set, the debugger goes into
NonStop
mode and will not connect to a terminal. If interrupted (or if control goes to the debugger via explicit setting of$DB::signal
or$DB::single
from the Perl program), it connects to a terminal specified in theTTY
option at startup, or to a terminal found at run time using theTerm::Rendezvous
module of your choice.This module should implement a method named
new
that returns an object with two methods:IN
andOUT
. These should return filehandles for the debugger to use its input and output correspondingly. Thenew
method should inspect an argument containing the value of$ENV{PERLDB_NOTTY}
at startup, or "/tmp/perldbtty$$
" otherwise. This file is not inspected for proper ownership or wide-open write access, so security hazards are theoretically possible.ReadLine
If false,
ReadLine
support in the debugger is disabled in order to debug applications ...
Get Programming Perl, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.