Vscode-java-debug: Debugger stopped working after upgrading to 0.3.1?

Created on 18 Nov 2017  路  15Comments  路  Source: microsoft/vscode-java-debug

Here is my configuration:

{ // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "type": "java", "name": "Debug (Launch)", "request": "launch", "mainClass": "com.xxxx.xxxxxx", "vmArgs": "-Xms2000m -Xmx3000m -Dspring.profiles.active=dev -Dspring.config.location=file:/Users/xxxxxx/app/src/main/resources/config/local/application.yml -agentpath:/Users/xxxxx/jrebel/lib/libjrebel64.dylib", "cwd": "${workspaceFolder}" } ] }

Not sure what happened, but it seems after upgrading to 0.3.1, the debugger stopped working. Once started, it shows "Compiling workspace" and then the following error.

image

I don't remember seeing "Compiling workspace" before, and I don't need it actually. Downgrading to 0.2.0 works.

Environment
  • Operating System: Mac
  • JDK version: 1.8.0_144
  • Visual Studio Code version: 1.18.1
  • Java extension version: 0.14.0
  • Java Debugger extension version: 0.3.1
bug

Most helpful comment

Workaround: I had to manually modify the configurationProvider.js file to remove the compilation (in extensions\vscjava.vscode-java-debug-0.3.1\out\src).
Line 92: comment the whole try / catch so that compilation is not required anymore.
This should be an option (force recompilation everytime or not), as this is not exactly useful (code is recompiled automatically anyway on save...).

Nice extension anyway :-)

All 15 comments

I see the exact same behavior in my case it is trying to attach to an already running application.

Compiling the workspace should be removed for attaching case.

One known cause is that language server would link current src files into default project, which I'll investigate later. For this case, cleaning your local vscode storage folder(%AppData%\Code\User\workspaceStorage) would unblock it.

@ansyral Cleaning /workspaceStorage doesn't work for me.

@shawnwithlegion try to remove the Java Debug extension, reload VS Code and reinstall it.

@snjeza

I've tried this didn't work doesn't anyone knows how to fix this issue

@shawnwithlegion try to remove the LS for Java by Red Hat extension and reinstall it.

@snjeza I did but it didn't fix the issue. I had to downgrade to 0.2.0 for now.

Workaround: I had to manually modify the configurationProvider.js file to remove the compilation (in extensions\vscjava.vscode-java-debug-0.3.1\out\src).
Line 92: comment the whole try / catch so that compilation is not required anymore.
This should be an option (force recompilation everytime or not), as this is not exactly useful (code is recompiled automatically anyway on save...).

Nice extension anyway :-)

@wokhan Can confirm this works for me, with version 0.3.1.

Agreed with @wokhan. Forcing compilation every time should be an option.

@ansyral @testforstephen is this already resolved?

issue not fixed with 0.4.0. Not it's showing something like "the response is not either an error or...."

@shawnwithlegion are you using the latest version 0.15.0 of https://marketplace.visualstudio.com/items?itemName=redhat.java with the change log which contains full and incremental compilation.

@andxu works with 0.15.0. Thanks!

Close this as it has been fixed in the latest vscode-java/vscode-java-debugger.

Was this page helpful?
0 / 5 - 0 ratings