Function: dape-breakpoint-load
dape-breakpoint-load is an interactive and natively compiled function
defined in dape.el.
Signature
(dape-breakpoint-load &optional FILENAME)
Documentation
Restore breakpoints from previously saved FILE.
All breakpoints will be removed before loading new ones.
Will open buffers containing breakpoints.
Will use dape-default-breakpoints-file if FILENAME is nil.
Key Bindings
This command is not in any keymaps.
Source Code
;; Defined in /nix/store/1fiaif8pifqj2jh65rbg3fkhg3i56q42-emacs-packages-deps/share/emacs/site-lisp/elpa/dape-0.27.1/dape.el
(defun dape-breakpoint-load (&optional filename)
"Restore breakpoints from previously saved FILE.
All breakpoints will be removed before loading new ones.
Will open buffers containing breakpoints.
Will use `dape-default-breakpoints-file' if FILENAME is nil."
(interactive
(list (read-file-name "Load breakpoints from file: ")))
(setq filename (or filename dape-default-breakpoints-file))
(when (file-exists-p filename)
(dape-breakpoint-remove-all)
(let ((breakpoints
(with-temp-buffer
(insert-file-contents filename)
(goto-char (point-min))
(nreverse (read (current-buffer))))))
(cl-loop for (filename line type value) in breakpoints
if (find-buffer-visiting filename)
do (dape--with-line (find-file-noselect filename) line
(dape--breakpoint-place type value))
else do
(add-hook 'find-file-hook #'dape--breakpoint-find-file-hook)
(push (make-dape--source-breakpoint :location (cons filename line)
:type type
:value value)
dape--breakpoints))))
(dape--breakpoint-notify-all))