NAME

DBGp::Client - simple client for the DBGp debugger protocol

SYNOPSIS

$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;
}

DESCRIPTION

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.

AUTHOR

Mattia Barbon <mbarbon@cpan.org>

LICENSE

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.