Devel::hdb::App::Control - Control execution of the debugged program
Registers routes for methods to control execution of the debugged program
Get status information about the debugged program. Returns 200 and a JSON-encoded hash in the body with these keys:
running => True if the program is running, false if terminated subroutine => Name of the subroutine the program is stopped in filename => Name of the file the program is stopped in line => Line number the program is stopped on stack_depth => How deep the program stack currently is events => Array of program events since the last status report
For each event, there will be a hash describing the event. All events have a 'type' key. The other keys are type-specific.
Immediately after the debugged program fork()s.
type => "fork" pid => Child process ID href => URL to communicate with the child process debugger gui_href => URL to bring up the child process GUI href_continue => URL to GET to tell the child to run without stopping
When the program generates an uncaught exception
type => "exception" value => Value of the exception package => Location where the exception occurred filename => ... subroutine => ... line => ...
When a watchpoint expression changes value. The location reported is whichever line had executed immediately before the current program line - likely the line that caused the change.
type => "watchpoint" expr => Expression that changed value old => Listref of the previous value new => Listref of the new value package => Location where the value was changed filename => ... subroutine => ... line => ...
When the program is terminating
type => "exit" value => Program exit code
When the program is exiting and will not respond to further requests.
type => "hangup"
When run in follow mode and an execution difference has happened.
type => "trace_diff" filename => Where the program is stopped now line => ... package => ... subroutine => ... sub_offset => ... expected_filename => where the trace expected to be instead expected_line => ... expected_package => ... expected_subroutine => ...
Causes the debugger to execute the current statement and pause before the next. If the current statement involves a function call, execution stops at the first line inside the called function.
Returns 200 and the same JSON hash as GET /status
Causes the debugger to execute the current statement and pause before the next. If the current statement involves function calls, these functions are run to completion and execution stops before the next statement at the current stack level. If execution of these functions leaves the current stack frame, usually from an exception caught at a higher frame or a goto, execution pauses at the first statement following the unwinding.
Causes the debugger to start running continuously until the current stack frame exits.
Causes the debugger to start running continuously until it encounters another breakpoint.
Request the debugger continue execution. The param nostop=1 instructs the debugger to run the program to completion and not stop at any breakpoints.
Returns 204 if successful.
/status, /stepin, /stepover, /stepout and continue accept either or both of these optional parameters
/status
/stepin
/stepover
/stepout
continue
The returned status hash includes a next_statement key whose value is a string representation of the next Perl statement to execute.
next_statement
The returned status hash includes a next_fragment key whose value is a string representation of the immediately-next opcode to execute. The integer value is the number of parents of the current opcode to go up before starting to deparse. 0 means to deparse only the current opcode; 1 means to deparse the current opcode's parent and that parent's children.
next_fragment
Devel::hdb
Anthony Brummett <brummett@cpan.org>
Copyright 2018, Anthony Brummett. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.
To install Devel::hdb, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Devel::hdb
CPAN shell
perl -MCPAN -e shell install Devel::hdb
For more information on module installation, please visit the detailed CPAN module installation guide.