perl-dap-breakpoint
AST-based breakpoint validation for Perl DAP sessions.
Use this crate before you hand a breakpoint to the runtime. It answers two questions: is this line executable, and if not, what nearby line should the debugger suggest instead?
Boundaries
perl-dapuses this crate to validate breakpoints before sending them to the runtime.perl-dap-platformandperl-dap-shellprepare launch inputs; they do not validate source lines.- This crate does not speak DAP itself. It only reasons about source text and parsed AST shape.
Key API
AstBreakpointValidatorBreakpointValidationBreakpointValidatorValidationReasonfind_nearest_valid_lineSearchDirection
Example
use ;
let source = "# comment\nmy $x = 1;\n";
let validator = new?;
let result = validator.validate;
assert!;
assert_eq!;