Skip to content

Commit

Permalink
Fix regression in dap-debug
Browse files Browse the repository at this point in the history
- it could be called non interativelly and it should populate the debug args
  • Loading branch information
yyoncho committed Jan 9, 2019
1 parent 51cfb1a commit c217371
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions dap-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ should be started after the :port argument is taken.
(default-directory (or cwd default-directory)))
(mapc (-lambda ((env . value)) (setenv env value)) environment-variables)

(when program-to-start(compile program-to-start))
(when program-to-start (compile program-to-start))
(when wait-for-port (dap--wait-for-port host port))

(unless skip-debug-session
Expand Down Expand Up @@ -1143,8 +1143,16 @@ CONFIGURATION-SETTINGS - plist containing the preset settings for the configurat
If DEBUG-ARGS is not specified the configuration is generated
after selecting configuration template."
(interactive (list (dap--select-template)))
(dap-start-debugging debug-args))
(interactive (list (-> (dap--completing-read "Select configuration template: "
dap--debug-template-configurations
'first nil t)
rest
copy-tree)))
(dap-start-debugging (or (-some-> (plist-get debug-args :type)
(gethash dap--debug-providers)
(funcall debug-args))
(error "There is no debug provider for language %s"
(or (plist-get debug-args :type) "'Not specified'")))))

(defun dap-debug-edit-template (debug-args)
"Edit template DEBUG-ARGS."
Expand Down

0 comments on commit c217371

Please sign in to comment.