Function: dape-info-scope-data-breakpoint
dape-info-scope-data-breakpoint is an interactive and natively
compiled function defined in dape.el.
Signature
(dape-info-scope-data-breakpoint &optional EVENT)
Documentation
Add data breakpoint on variable at current line.
Key Bindings
dape-info-scope-mode-line-map b dape-info-scope-mode-map b dape-info-watch-mode-line-map b dape-info-watch-mode-map b
Source Code
;; Defined in /nix/store/1fiaif8pifqj2jh65rbg3fkhg3i56q42-emacs-packages-deps/share/emacs/site-lisp/elpa/dape-0.27.1/dape.el
(dape--command-at-line dape-info-scope-data-breakpoint (dape--reference dape--variable)
(dape-info-scope-mode dape-info-watch-mode)
"Add data breakpoint on variable at current line."
(let ((conn (dape--live-connection 'stopped))
(name (or (plist-get dape--variable :evaluateName)
(plist-get dape--variable :name))))
(unless (dape--capable-p conn :supportsDataBreakpoints)
(user-error "Adapter does not support data breakpoints"))
(dape--with-request-bind
((&key dataId description accessTypes &allow-other-keys) error)
(dape-request conn :dataBreakpointInfo
(if (numberp dape--reference)
(list :variablesReference dape--reference
:name name)
(list :name name
:frameId (plist-get (dape--current-stack-frame conn) :id))))
(if (or error (not (stringp dataId)))
(message "Unable to set data breakpoint: %s" (or error description))
(push (make-dape--data-breakpoint
:name name
:data-id dataId
:access-type (completing-read
(format "Breakpoint type for `%s': " name)
(append accessTypes nil) nil t))
dape--breakpoints)
(dape--with-request
(dape--set-data-breakpoints conn)
;; Make sure breakpoint buffer is displayed
(dape--display-buffer
(dape--info-get-buffer-create 'dape-info-breakpoints-mode))
(run-hooks 'dape-update-ui-hook))))))