Skip to content

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

Closed
microsoft/java-debug
#374

Description

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: redhat-developer/vscode-java#1915

Activity

  1. kjq commented on Apr 29, 2021

    @kjq

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

  2. rgrunber commented on Apr 29, 2021

    @rgrunber
    [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 .

  3. fbricon commented on Apr 29, 2021

    @fbricon
    Collaborator
  4. rubensa commented on Apr 30, 2021

    @rubensa
    Author

    Checked! It works!

    Thanks Snjeza (@snjeza)

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

  5. saumilsdk commented on Apr 30, 2021

    @saumilsdk

    How did you make it work?

  6. testforstephen commented on Apr 30, 2021

    @testforstephen
    Contributor

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

  7. saumilsdk commented on Apr 30, 2021

    @saumilsdk

    Ok temporarily I have locally downgraded version to 0.77.0.

    image

    image

  8. AYiXi commented on Apr 30, 2021

    @AYiXi

    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

  9. testforstephen commented on Apr 30, 2021

    @testforstephen
    Contributor

    Hi, I just released a hotfix release 0.33.1 for "Debugger for Java" extension. It will work with both vscode-java@0.77.0 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.

  10. rubensa commented on Apr 30, 2021

    @rubensa
    Author

    Hi, I just released a hotfix release 0.33.1 for "Debugger for Java" extension. It will work with both vscode-java@0.77.0 and 0.78.0. Please have a try. thanks.

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

    Anyway Jinbo Wang (@testforstephen) thank you for the fast fix to the issue.

  11. AYiXi commented on Apr 30, 2021

    @AYiXi

    nbnb!!

  12. testforstephen commented on Apr 30, 2021

    @testforstephen
    Contributor

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

    Ruben Suarez Alvarez (@rubensa) the vsix is added to Github.

  13. dhirenpratap commented on May 1, 2021

    @dhirenpratap

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

  14. MxD-js commented on May 8, 2021

    @MxD-js

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions