Devel-Debug-DBGp
view release on metacpan or search on metacpan
Devel/Debug/DBGp.pm view on Meta::CPAN
Defaults to C<1>; whether the debugger program should connect to the
DBGp client early during startup.
When set to C<0>, use L</connectOrReconnect> to initiate the connection.
=item KeepRunning
PERLDB_OPTS="... KeepRunning=[0|1] ..."
Defaults to C<0>; whether the debugged program should keep running
with debugging disabled if the DBGp client drops the connection.
=back
=head2 RemotePort
Equivalent to adding C<RemotePort=...> to C<PERLDB_OPTS>.
=head2 DEBUGGER_APPID
If set, it is returned as the C<appid> attribute of the C<init>
message (defaults to L<perlvar/$$> otherwise.
=head2 DBGP_IDEKEY
If set, it is returned as the C<idekey> attribute of the C<init> message.
=head2 DBGP_COOKIE
If set, it is returned as the C<session> attribute of the C<init> message.
=head2 HOST_HTTP
If set, overrides the value of the C<hostname> attribute in the C<init> message.
=head2 DBGP_PERL_IGNORE_PADWALKER
If set to a true value, does not use L<PadWalker> to get the list of
local variables, but uses a combination of L<B> and C<eval STRING>.
=head2 DBGP_PURE_PERL, DBGP_XS_ONLY
The default is to try to load an XS helper for the debugger, and fall
back to the pure-Perl implementation if loading the XS helper fails
(or the helper has not been built). Setting C<DBGP_PURE_PERL> or
C<DBGP_XS_ONLY> allows to explicitly choose one or the other.
=head1 FUNCTIONS
There is no need to use any of the functions below unless you are
writing an higher-level interface to the debugger (for example
L<Plack::Middleware::DBGp>).
=head2 connectOrReconnect
DB::connectOrReconnect();
Connects to the debugger client (closes the current connection if any).
If the debugger client is not listening at the specified endpoint,
debugging is disabled (via L</disable>) and execution continues
normally.
=head2 isConnected
my $connected = DB::isConnected();
Whether the debugger is connected to a client.
=head2 disable
DB::disable();
Disables debugging. The debugged program should run at nearly normal
speec with debugging disabled..
=head2 enable
DB::enable();
Re-enables debugging after a L</disable> call.
=head2 disconnect
DB::disconnect();
Disconnects from the debugger client.
=cut
use strict;
use warnings;
our $VERSION = '0.22';
sub debugger_path {
for my $dir (@INC) {
return "$dir/dbgp-helper"
if -f "$dir/dbgp-helper/perl5db.pl"
}
die "Unable to find debugger library 'dbgp-helper' in \@INC (@INC)";
}
1;
__END__
=head1 SEE ALSO
L<perldebguts>, L<http://code.activestate.com/komodo/remotedebugging/>
=head1 AUTHORS
Mattia Barbon <mbarbon@cpan.org> - packaging and misc changes/fixes
derived from ActiveState Komodo Remote Debugging Helper
derived from the Perl 5 debugger (perl5db.pl)
( run in 0.743 second using v1.01-cache-2.11-cpan-524268b4103 )