|
If you have compile-time executable statements (such as code within BEGIN and CHECK blocks or
use statements), these will not be stopped by debugger, although requires
and INIT blocks will, and compile-time statements can be traced with AutoTrace
option set in PERLDB_OPTS). From your own Perl code, however, you can transfer
control back to the debugger using the following statement, which is harmless if the debugger is
not running:
If you set $DB::single to 2, it's equivalent to having just typed the n
command, whereas a value of 1 means the s command. The $DB::trace
variable should be set to 1 to simulate having typed the t command.
Another way to debug compile-time code is to start the debugger, set a breakpoint on the load
of some module:
DB<7> b load f:/perllib/lib/Carp.pm
Will stop on load of `f:/perllib/lib/Carp.pm'.
|
|
and then restart the debugger using the R command (if possible). One can use b
compile subname for the same purpose.
|
|