Function: dape--set-data-breakpoints
dape--set-data-breakpoints is a natively compiled function defined in
dape.el.
Signature
(dape--set-data-breakpoints CONN CB)
Documentation
Set data breakpoints for adapter CONN.
See dape-request for expected CB signature.
Source Code
;; Defined in /nix/store/1fiaif8pifqj2jh65rbg3fkhg3i56q42-emacs-packages-deps/share/emacs/site-lisp/elpa/dape-0.27.1/dape.el
(defun dape--set-data-breakpoints (conn cb)
"Set data breakpoints for adapter CONN.
See `dape-request' for expected CB signature."
(let ((data-breakpoints (cl-remove-if-not #'dape--data-breakpoint-p
dape--breakpoints)))
(if (dape--capable-p conn :supportsDataBreakpoints)
(dape--with-request-bind
((&key breakpoints &allow-other-keys) error)
(dape-request conn :setDataBreakpoints
(list
:breakpoints
(cl-map 'vector
(lambda (bp)
(list :dataId (dape--data-breakpoint-data-id bp)
:accessType (dape--data-breakpoint-access-type bp)))
data-breakpoints)))
(when error
(dape--message "Failed to setup data breakpoints: %s" error))
(cl-loop
for bp in data-breakpoints
for res across (or breakpoints [])
unless (eq (plist-get res :verified) t)
collect bp into unverified
finally do
(when unverified
(dape--warn "Failed setting data breakpoints for %s"
(mapconcat #'dape--data-breakpoint-name unverified ", ")))
;; FIXME Should not remove unverified-breakpoints as they
;; might be verified by another live connection.
(setq dape--breakpoints
(cl-set-difference dape--breakpoints unverified)))
(dape--request-continue cb error))
(setq dape--breakpoints
(cl-remove-if #'dape--data-breakpoint-p dape--breakpoints))
(dape--request-continue cb))))