Skip to content

Commit 804e364

Browse files
authored
Add support for async conf (#258)
1 parent 3424ebe commit 804e364

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

dap-mode.el

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,12 +1411,15 @@ after selecting configuration template."
14111411
'cl-first nil t)
14121412
cl-rest
14131413
copy-tree)))
1414-
(dap-start-debugging (or (-some-> (plist-get debug-args :type)
1415-
(gethash dap--debug-providers)
1416-
(funcall debug-args))
1417-
(user-error "Have you loaded the `%s' specific dap package?"
1418-
(or (plist-get debug-args :type)
1419-
(user-error "%s does not specify :type" debug-args))))))
1414+
(let ((launch-args (or (-some-> (plist-get debug-args :type)
1415+
(gethash dap--debug-providers)
1416+
(funcall debug-args))
1417+
(user-error "Have you loaded the `%s' specific dap package?"
1418+
(or (plist-get debug-args :type)
1419+
(user-error "%s does not specify :type" debug-args))))))
1420+
(if (functionp launch-args)
1421+
(funcall launch-args #'dap-start-debugging)
1422+
(dap-start-debugging launch-args))))
14201423

14211424
(defun dap-debug-edit-template (&optional parg debug-args)
14221425
"Edit registered template DEBUG-ARGS.

0 commit comments

Comments
 (0)