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 /breakpoint

Get breakpoint information about a particular file and line number. Accepts these parameters: f File name l Line number

Returns a JSON-encoded hash 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

POST /breakpoint

Set a breakpoint. Accepts these parameters: f File name l Line number c Breakpoint condition code. This can be a bit of Perl code to represent a conditional breakpoint, or "1" for an unconditional breakpoint. ci Set to true to make the breakpoint condition inactive, false to clear the setting.

It responds with the same JSON-encoded hash as GET /breakpoint. If the condition is empty/false (to clear the breakpoint) the response will only include the keys 'filename' and 'lineno'.

GET /delete-breakpoint

Delete a breakpoint on a particular file ane line number. Requires these parameters: f File name l Line number

GET /breakpoints

Request data about all breakpoints. Return a JSON-encoded array. Each item in the array is a hash with the same information returned by GET /breakpoint.

SEE ALSO

Devel::hdb

AUTHOR

Anthony Brummett <brummett@cpan.org>

COPYRIGHT

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