Skip to content

Commit

Permalink
Enable breakpoint creation from breakpoint request
Browse files Browse the repository at this point in the history
  • Loading branch information
svaante committed Oct 14, 2024
1 parent c845a67 commit 2de4925
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dape.el
Original file line number Diff line number Diff line change
Expand Up @@ -1962,8 +1962,12 @@ Update `dape--breakpoints' according to BODY."
:key (lambda (breakpoint)
(plist-get (dape--breakpoint-id breakpoint) conn)))))
(dape--breakpoint-update conn breakpoint update)
;; TODO Breakpoint event should be able to create breakpoints
)))
(dape--with-request (dape--source-ensure conn update)
(when-let ((marker (dape--object-to-marker conn update)))
(dape--with-line (marker-buffer marker) (plist-get update :line)
(dape--message "Creating breakpoint in %s:%d"
(buffer-name) (plist-get update :line))
(dape--breakpoint-place)))))))

(cl-defmethod dape-handle-event (conn (_event (eql module)) body)
"Handle adapter CONNs module events.
Expand Down

0 comments on commit 2de4925

Please sign in to comment.