Function: dape-restart
dape-restart is an interactive and natively compiled function defined
in dape.el.
Signature
(dape-restart &optional CONN SKIP-COMPILE)
Documentation
Restart debugging session.
CONN is inferred for interactive invocations. SKIP-COMPILE is used internally for recursive calls.
Key Bindings
ctl-x-map C-a r dape-global-map r global-map C-x C-a r help-quick-use-map C-x C-a r
Source Code
;; Defined in /nix/store/1fiaif8pifqj2jh65rbg3fkhg3i56q42-emacs-packages-deps/share/emacs/site-lisp/elpa/dape-0.27.1/dape.el
(defun dape-restart (&optional conn skip-compile)
"Restart debugging session.
CONN is inferred for interactive invocations.
SKIP-COMPILE is used internally for recursive calls."
(interactive (list (dape--live-connection 'last t)))
(dape--stack-frame-cleanup)
(cond
(;; Restart if adapter supports it
(and conn (dape--capable-p conn :supportsRestartRequest))
(if (and (not skip-compile) (plist-get (dape--config conn) 'compile))
(dape--compile (dape--config conn)
(lambda () (dape-restart conn 'skip-compile)))
(dape--breakpoints-reset 'from-restart)
(setq dape--connection-selected nil)
(setf (dape--threads conn) nil
(dape--thread-id conn) nil
(dape--modules conn) nil
(dape--sources conn) nil
(dape--restart-in-progress-p conn) t)
(when (length= (dape--live-connections-root) 1)
(dape-active-mode -1))
(dape--with-request
(dape-request conn :restart
`(:arguments ,(dape--launch-or-attach-arguments conn)))
(unless dape-active-mode
(dape-active-mode +1))
(setf (dape--restart-in-progress-p conn) nil))))
(;; Use previous connections configuration
dape--connections
(let ((conn (or (and conn (dape--root-of conn))
(car dape--connections))))
(dape--with-request (dape-kill conn)
(dape (dape--config conn)))))
(;; Use history
dape-history
(dape (apply #'dape--config-eval (dape--config-from-string (car dape-history)))))
((user-error "Unable to derive session to restart, run `dape'"))))