lsp-java icon indicating copy to clipboard operation
lsp-java copied to clipboard

dap-debug not respecting lsp-java-configuration-runtimes

Open wakira opened this issue 3 years ago • 0 comments

Describe the bug I setup lsp-java-java-path to run jdtls using java 15 and configured lsp-java-configuration-runtimes to work with my Java 8 projects.

While other lsp features such as Goto Definition and diagnostics work flawlessly, dap-debug sessions using configuration :request "attach" is launched with java15 instead of Java8 runtime.

To Reproduce I am using this config:

(setq lsp-java-java-path "C:\\Users\\a64\\AppData\\Local\\pleiades\\java\\15\\bin\\java.exe"
      lsp-java-configuration-runtimes '[(:name "JavaSE-1.8"
                                               path "C:\\Users\\a64\\AppData\\Local\\pleiades\\java\\8"
                                               :default t)])
;; I also set dap-java-java-command but it seems to only have effect on :request compile_attach
(setq dap-java-java-command "C:\\Users\\a64\\AppData\\Local\\pleiades\\java\\8\\bin\\java.exe")

M-x dap-debug and select "Java Run Configuration"

Expected behavior Debug session should be launched using Java 8 (VSCode behaves like this)

wakira avatar Apr 07 '22 04:04 wakira