The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Devel::hdb::App::Breakpoint - Get and set breakpoints

DESCRIPTION

Breakpoints are perl code snippets run just before executable statements in the debugged program. If the code returns a true value, then the debugger will stop before that program statement is executed.

These code snippets are run in the context of the debugged program and have access to any of its variables, lexical included.

Unconditional breakpoints are usually stored as "1".

Routes

GET /breakpoints

Get breakpoint information about a particular file and line number. Accepts these parameters as filters to limit the returned breakpoint data: filename File name line Line number code Perl code string inactive True if the breakpoint is inactive

Returns 200 and a JSON-encoded array containing hashes with these keys: filename => File name lineno => Line number code => Breakpoint condition, or 1 for an unconditional break inactive => 1 (yes) or undef (no), whether this breakpoint is disabled/inactive href => URL string to uniquely identify this breakpoint

POST /breakpoints

Create a breakpoint. Breakpoint details must appear in the body as JSON hash with these keys: filename File name line Line number code Breakpoint condition code. This can be a bit of Perl code to represent a conditional breakpoint, or "1" for an unconditional breakpoint. inactive Set to true to make the breakpoint condition inactive, false to clear the setting.

It responds 200 with the same JSON-encoded hash as GET /breakpoints. Returns 403 if the line is not breakable. Returns 404 if the filename is not loaded.

GET /breakpoints/<id>

Return the same JSON-encoded hash as GET /breakpoints. Returns 404 if there is no breakpoint with that id.

POST /breakpoints/<id>

Change a breakpoint property. The body contains a JSON hash of which keys to change, along with their new values. Returns 200 and the same JSON hash as GET /breakpoints, including the new values.

Returns 403 if the given property cannot be changed. Returns 404 if there is no breakpoint with that id.

DELETE /breakpoints/<id>

Delete the breakpoint with the given id. Returns 204 if successful. Returns 404 if there is no breakpoint with that id.

SEE ALSO

Devel::hdb

AUTHOR

Anthony Brummett <brummett@cpan.org>

COPYRIGHT

Copyright 2018, Anthony Brummett. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.