dansomething / coc-java-debug

An extension for coc.nvim to enable Java debugging via jdt.ls
https://www.npmjs.com/package/coc-java-debug
Eclipse Public License 2.0
100 stars 8 forks source link

Unable to set breakpoint: java.lang.IllegalArgumentException #17

Closed opensourcegeek closed 3 years ago

opensourcegeek commented 3 years ago

I'm seeing Unable to set breakpoint: java.lang.IllegalArgumentException whenever I kick off a test with a break point set in one of the tests. The command I use is, mvn clean -Dmaven.surefire.debug test. The same setup works on my laptop (running slightly older arch), on my desktop I hit this issue. I'm not sure how to debug this problem. Any help please?

Below is my jdt.ls server log ,

!ENTRY java-debug 1 0 2021-03-09 16:22:29.783
!MESSAGE Trying to attach to remote debuggee VM null:5005 .

!ENTRY java-debug 1 0 2021-03-09 16:22:29.817
!MESSAGE Attaching to debuggee VM succeeded.

!ENTRY java-debug 4 0 2021-03-09 16:22:32.345
!MESSAGE [error response][setBreakpoints]: java.lang.IllegalArgumentException
!STACK 0
java.lang.IllegalArgumentException
    at org.eclipse.jdt.core.dom.ASTParser.<init>(ASTParser.java:240)
    at org.eclipse.jdt.core.dom.ASTParser.newParser(ASTParser.java:134)
    at com.microsoft.java.debug.plugin.internal.JdtSourceLookUpProvider.getFullyQualifiedName(JdtSourceLookUpProvider.java:105)
    at com.microsoft.java.debug.core.adapter.handler.SetBreakpointsRequestHandler.convertClientBreakpointsToDebugger(SetBreakpointsRequestHandler.java:277)
    at com.microsoft.java.debug.core.adapter.handler.SetBreakpointsRequestHandler.handle(SetBreakpointsRequestHandler.java:125)
    at com.microsoft.java.debug.core.adapter.DebugAdapter.lambda$dispatchRequest$0(DebugAdapter.java:87)
    at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1106)
    at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2235)
    at com.microsoft.java.debug.core.adapter.DebugAdapter.dispatchRequest(DebugAdapter.java:86)
    at com.microsoft.java.debug.core.adapter.ProtocolServer.dispatchRequest(ProtocolServer.java:118)
    at com.microsoft.java.debug.core.protocol.AbstractProtocolServer.lambda$new$0(AbstractProtocolServer.java:78)
    at io.reactivex.internal.observers.LambdaObserver.onNext(LambdaObserver.java:60)
    at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:200)
    at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:252)
    at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:61)
    at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:52)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)

!ENTRY java-debug 1 0 2021-03-09 16:50:13.409
!MESSAGE Debug connection closed
dansomething commented 3 years ago

My recommendation would be to review the logs for a better indication of what is failing. 1) View the trace logging output for the Java language server { "java.trace.server": "verbose" } in :CocSettings 2) View the Vimspector log :VimspectorShowOutput Vimspector 3) View the messages in Vim :messages

Also, is it possible you're running out of date software?

dansomething commented 3 years ago

A couple other questions:

opensourcegeek commented 3 years ago

:CocCommand java.updateLanguageServer did the trick, I kind of assumed everything was recent. Thanks a lot @dansomething