Skip to content

Commit

Permalink
Add default args for debug sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
yyoncho committed May 19, 2021
1 parent 1a41c90 commit 5680936
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dap-java.el
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ If the port is taken, DAP will try the next port."
(const 'externalTerminal)
(const 'internalConsole)))

(defcustom dap-java-args []
"Default java args."
:group 'dap-java
:type 'lsp-string-vector)

(defcustom dap-java-test-additional-args ()
"Additional arguments for JUnit standalone runner."
:group 'dap-java
Expand Down Expand Up @@ -164,7 +169,7 @@ Please check whether the server is configured propertly"))

(-let [(&plist :mainClass main-class :projectName project-name) conf]
(-> conf
(dap--put-if-absent :args "")
(dap--put-if-absent :args dap-java-args)
(dap--put-if-absent :cwd (lsp-java--get-root))
(dap--put-if-absent :stopOnEntry :json-false)
(dap--put-if-absent :host "localhost")
Expand Down

0 comments on commit 5680936

Please sign in to comment.