Vscode-java-debug: After upgrade from vscode-java v0.77.0 to v0.78.0 can't debug tests

Created on 29 Apr 2021  路  15Comments  路  Source: microsoft/vscode-java-debug

After upgrade vscode-java from v0.77.0 to v0.78.0 can't debug tests, only execute them

Environment
  • Operating System: Linux
  • JDK version: 11
  • Visual Studio Code version: 1.55.2
  • Java extension version: 0.78.0
Steps To Reproduce
  1. Open a maven project with JUnit tests
  2. Try run the test in debug mode
Current Result

An error message appears and the test can't be run

Expected Result

Test is run stopping at any break point

Additional Informations

I I downgrade to version 0.77.0 everything works as expected.

The error message in the log is:
java.lang.NoSuchMethodError: 'void org.eclipse.jdi.internal.connect.ConnectorImpl$StringArgumentImpl.<init>(org.eclipse.jdi.internal.connect.ConnectorImpl, java.lang.String, java.lang.String, java.lang.String, boolean)'

see: https://github.com/redhat-developer/vscode-java/issues/1915

bug

Most helpful comment

I get the same issue. Wasted the whole day till I came across this. Downgrading fixes it.

All 15 comments

I get the same issue. Wasted the whole day till I came across this. Downgrading fixes it.

[Error - 4:06:47 PM] Apr 29, 2021, 4:06:47 PM [error response][launch]: 'void org.eclipse.jdi.internal.connect.ConnectorImpl$StringArgumentImpl.<init>(org.eclipse.jdi.internal.connect.ConnectorImpl, java.lang.String, java.lang.String, java.lang.String, boolean)'
'void org.eclipse.jdi.internal.connect.ConnectorImpl$StringArgumentImpl.<init>(org.eclipse.jdi.internal.connect.ConnectorImpl, java.lang.String, java.lang.String, java.lang.String, boolean)'
java.lang.NoSuchMethodError: 'void org.eclipse.jdi.internal.connect.ConnectorImpl$StringArgumentImpl.<init>(org.eclipse.jdi.internal.connect.ConnectorImpl, java.lang.String, java.lang.String, java.lang.String, boolean)'
    at com.microsoft.java.debug.plugin.internal.AdvancedLaunchingConnector$AdvancedStringArgumentImpl.<init>(AdvancedLaunchingConnector.java:124)
    at com.microsoft.java.debug.plugin.internal.AdvancedLaunchingConnector.defaultArguments(AdvancedLaunchingConnector.java:47)
    at com.microsoft.java.debug.core.DebugUtility.launch(DebugUtility.java:205)
    at com.microsoft.java.debug.core.DebugUtility.launch(DebugUtility.java:97)
    at com.microsoft.java.debug.core.adapter.handler.LaunchWithDebuggingDelegate.launch(LaunchWithDebuggingDelegate.java:180)
    at com.microsoft.java.debug.core.adapter.handler.LaunchRequestHandler.launch(LaunchRequestHandler.java:242)
    at com.microsoft.java.debug.core.adapter.handler.LaunchRequestHandler.handleLaunchCommand(LaunchRequestHandler.java:142)
    at com.microsoft.java.debug.core.adapter.handler.LaunchRequestHandler.handle(LaunchRequestHandler.java:81)
    at com.microsoft.java.debug.core.adapter.DebugAdapter.lambda$dispatchRequest$0(DebugAdapter.java:89)
    at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1183)
    at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2305)
    at com.microsoft.java.debug.core.adapter.DebugAdapter.dispatchRequest(DebugAdapter.java:88)
    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:1130)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
    at java.base/java.lang.Thread.run(Thread.java:831)

Maybe the java-debug LS needs to be rebuilt against the latest JDT-LS. I know that between 0.77.0 and 0.78.0, JDT-LS bumped it's target platform from 4.19 to 4.20M1, which would have included https://github.com/eclipse/eclipse.jdt.debug/commit/703498f768b73a3f3ca26aba7e74da2c0e6807c0#diff-9edaaaad5de823a144b40d3074650b42973c116b4c595682ea98b2a94aa24c99 .

The problem is caused by https://github.com/eclipse/eclipse.jdt.debug/commit/703498f768b73a3f3ca26aba7e74da2c0e6807c0#diff-9edaaaad5de823a144b40d3074650b42973c116b4c595682ea98b2a94aa24c99R188

the java-debug plugin needs to be recompiled against the newer build indeed.

Checked! It works!

Thanks @snjeza

Any ETA for the new version to be released and available in the Marketplace?

How did you make it work?

I'm fixing it now, there will be a hotfix today.

Ok temporarily I have locally downgraded version to 0.77.0.

image

image

I'm fixing it now, there will be a hotfix today.

thx, It waste me so much time, I reinstalled old version several hours later, and close extension.autoUpdate to false

Hi, I just released a hotfix release 0.33.1 for "Debugger for Java" extension. It will work with both [email protected] and 0.78.0. Please have a try. thanks.

Update: "Debugger for Java" 0.33.1 also requires your VS Code version to be 1.55.0 and above.

Hi, I just released a hotfix release 0.33.1 for "Debugger for Java" extension. It will work with both [email protected] and 0.78.0. Please have a try. thanks.

Curious that is already published on the Marketplace but not yet on Github

Anyway @testforstephen thank you for the fast fix to the issue.

nbnb!!

Curious that is already published on the Marketplace but not yet on Github

@rubensa the vsix is added to Github.

Thanks a Lot. I wasted 4 hours on this yesterday.

Also issue in cdr/code-server, downgrading to 0.77 fixes it for now until 1.55 is released w/ code-server to apply update. Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

khe817 picture khe817  路  4Comments

James-Oswald picture James-Oswald  路  3Comments

AlexMAS picture AlexMAS  路  5Comments

bsaby picture bsaby  路  8Comments

PG-practice picture PG-practice  路  3Comments