Skip to content

Commit

Permalink
`dap-start-debugging-noexpand': expand :cwd
Browse files Browse the repository at this point in the history
In a previous commit, :cwd was expanded specifically in `dap-chrome'. Undo that,
and centralize expanding :cwd in `dap-start-debugging-noexpand'. This allows
:cwd to be a relative path.

Fixes #413.
  • Loading branch information
nbfalcon committed Nov 26, 2020
1 parent e582ff9 commit a4c3974
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dap-chrome.el
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
(setq conf (-> conf
(plist-put :type "chrome")
(plist-put :dap-server-path dap-chrome-debug-program)
(dap--put-if-absent :cwd (expand-file-name default-directory))))
(dap--put-if-absent :cwd default-directory)))
(dap--plist-delete
(pcase (plist-get conf :mode)
("url" (-> conf
Expand Down
3 changes: 2 additions & 1 deletion dap-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -1590,7 +1590,8 @@ before starting the debug process."
:wait-for-port :type :request :port
:startup-function :environment-variables :hostName host) launch-args)
(session-name (dap--calculate-unique-name name (dap--get-sessions)))
(default-directory (or cwd default-directory))
(default-directory (or (and cwd (expand-file-name cwd))
default-directory))
(process-environment (if environment-variables
(cl-copy-list process-environment)
process-environment))
Expand Down

0 comments on commit a4c3974

Please sign in to comment.