0

I have a gradle multiproject with different java subprojects. I'm also using lombok in my code. When I try debug a JUnit test using dap-java-debug-test-method, I therefore get error messages regarding lombok generated code, which is not available.

I have found out, that I (presumably) need to adjust vmArgs and add "-javaagent:~/workspace/java-tools/lombok.jar", but I don't know how to do this.

Can anyone provide a working debug configuration?

What I have done already:

  • (setq dap-java-vm-args '("-Xmx2G" "-Xms512M" "-javaagent:~/workspace/java-tools/lombok.jar")) in my .emacs with no effect

1 Answer 1

0

Use lsp-java-vmargs. This is what I have in my settings. I downgraded from lombok 1.18.34 (the latest) to 1.18.32 since I was getting an error that was causing the build to fail.

    (setq lsp-java-vmargs
          (list "-noverify"
                "-Xmx30G"
                "-XX:+UseStringDeduplication"
                "-XX:+UseParallelGC"
                "-XX:GCTimeRatio=4"
                "-XX:AdaptiveSizePolicyWeight=90"
                "-Dsun.zip.disableMemoryMapping=true"
                "-Xms1000m"
                "-XX:+EnableDynamicAgentLoading"
                ;; "-javaagent:/Users/marcelbecker/Downloads/lombok/lombok.jar"
                "-javaagent:/Users/marcelbecker/.gradle/caches/modules-2/files-2.1/org.projectlombok/lombok/1.18.32/17d46b3e205515e1e8efd3ee4d57ce8018914163/lombok-1.18.32.jar"
                ))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.