DBGp::Client - simple client for the DBGp debugger protocol
$listener = DBGp::Client::Listener->new(port => 9000); $listener->listen; while (my $client = $listener->accept) { # set a conditional breakpoint that never triggers, # but has side-effects in the condition $command = 'require Data::Dumper; print Data::Dumper::Dumper($var);'; $res = $client->send_command( 'breakpoint_set', '-t', 'conditional', '-f', 'file:///path/to/file.pl', '-n', $line, '--', encode_base64("$command; 0"), ); die $res->message if $res->is_error; # continue execution $res = $client->send_command('run'); die $res->message if $res->is_error; }
A simple client for the DBGp debugger protocol; it can be used for testing a debugger implementation or scripting a program through the debugger interface.
See DBGp::Client::Listener and DBGp::Client::Connection for API documentation.
Mattia Barbon <mbarbon@cpan.org>
Copyright (c) 2015-2016 Mattia Barbon. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install DBGp::Client, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBGp::Client
CPAN shell
perl -MCPAN -e shell install DBGp::Client
For more information on module installation, please visit the detailed CPAN module installation guide.