Skip to content

Commit

Permalink
debugger: only use state_reports with locations
Browse files Browse the repository at this point in the history
  • Loading branch information
samcowger committed Jan 24, 2025
1 parent 6601a35 commit e63ab53
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cn-dap/lib/debugger.ml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ let make (source_file : string) (procedure_name : string) : (t, string) Result.t
in
Log.d (Printf.sprintf "Looking for report file at %s" report_file);
let* report = report_from_file report_file in
let with_locations =
List.filter report.trace ~f:(fun t -> Option.is_some t.where.loc_cartesian)
in
let* frame_map =
Result.of_option
(FrameMap.of_state_reports report.trace)
(FrameMap.of_state_reports with_locations)
~error:"unable to create frame map"
in
Result.Ok { current_node = frame_map.root; frame_map; procedure_name; source_file }
Expand Down

0 comments on commit e63ab53

Please sign in to comment.