sts4 icon indicating copy to clipboard operation
sts4 copied to clipboard

Vscode Spring Boot Tools 1.39.0 prevents Java project from Running/Debugging

Open jaysonsosweet opened this issue 3 years ago • 6 comments

Describe the bug This last vscode Spring Boot Tools 1.39.0, prevents vscode from running or debugging a java project. When launching Run/Debug a java project "Activating extensions" appears briefly in status bar then fades, and then nothing. The whole process stops there without any log in the output console.

Downgrading to the v1.38.0 solves the problem. Spent the entire day work to find out what was causing this nonsense.

To Reproduce Upgrade to Spring Boot Tools 1.39.0. Then start a debugging session on your java project.

jaysonsosweet avatar Sep 16 '22 18:09 jaysonsosweet

Same problem here, back to 1.38.0 to continue working.

pelmato avatar Sep 19 '22 09:09 pelmato

Looks very odd... does this happen with any project? How about spring-petclinic? Are you able to launch it from vscode? Don't recall us adding anything to our tweaks to the launch in VSCode for 1.39... Anything interesting in Boot LS log? What is the VSCode version? Can you see the java process for the java project after all? Does it launch? If yes, what are the JVM args? One thing to try would be to find Boot-java › Live-information › Automatic-connection under Spring Boot Tools -> Features settings and turn it off. Any difference?

BoykoAlex avatar Sep 19 '22 14:09 BoykoAlex

Actually I can no longer reproduce after uninstalling/reinstalling all spring boot extensions.

pelmato avatar Sep 19 '22 16:09 pelmato

Here's my VSCode infos: Version: 1.71.2 (user setup) Commit: 74b1f979648cc44d385a2286793c226e611f59e7 Date: 2022-09-14T21:03:37.738Z Electron: 19.0.12 Chromium: 102.0.5005.167 Node.js: 16.14.2 V8: 10.2.154.15-electron.0 OS: Windows_NT x64 10.0.19042 Sandboxed: No

Was using latest version from all the Spring Boot Extension Pack, that is Sprint Boot Tools, Spring Initializr Java Support, Spring Boot Dashboard.

At first I did uninstalled/reinstalled all of them without any success. Then I downgraded one notch each of them one at a time until if found out Spring Boot Tools was the culprit.

Just have this arg in my launch.json : "args": "--spring.profiles.active=local"

Noticed as well that Spring Boot Dashboard was endlessly and unsuccessfully trying to find a project.

jaysonsosweet avatar Sep 20 '22 07:09 jaysonsosweet

One thing to try would be to find Boot-java › Live-information › Automatic-connection under Spring Boot Tools -> Features settings and turn it off. Any difference?

Let me try setting off that setting, and I'll come back to you.

Edit: Well no luck... Got back to 1.39.x. Switch off automatic-connection but no success.

jaysonsosweet avatar Sep 20 '22 07:09 jaysonsosweet

I've tried VSCode on Windows with almost identical info. The only difference my Win was 10.0.19041 and yours is 10.0.19042. It worked just fine for me. The only suspicious thing is inability to find a project by Spring Boot Dashboard. Perhaps it can't get the classpath for a project which means Boot LS probably can't get the classpath either... Therefore:

  1. I'd like to see the spring boot ls log file contents.
  2. Does this happen for any java project? Is this a specific java project? Is it a spring boot application or plain java app? Can you reproduce the issue with spring-petclinic app?
  3. What's the java runtime used to launch spring bool ls and jdt ls? Do you have a value for "java.jdt.ls.java.home" and/or "spring-boot.ls.java.home"? Otherwise java running the process should be java 17 embedded into vscode java extension. Please verify this with jconsole
  4. Anything different if you launch plain java app (non spring app)?

BoykoAlex avatar Sep 20 '22 14:09 BoykoAlex

Should be fixed with ec8a5a87ba5b06e8bb4e0fd6ef71405ab1cd0b34

BoykoAlex avatar Oct 07 '22 16:10 BoykoAlex

I still have this issue in 1.39.0

eb-kmd avatar Oct 14 '22 11:10 eb-kmd

@eb-kmd You can download the latest nightly snapshot build and install that manually in order to see if the fix that Alex mentioned works for you. You can find the link to the latest VSIX file at the bottom of this page: https://dist.springsource.com/snapshot/STS4/nightly-distributions.html.

martinlippert avatar Oct 24 '22 17:10 martinlippert

The official release is scheduled to be published sometime later this week.

martinlippert avatar Oct 24 '22 17:10 martinlippert

I suspect this was the same issue as #893

baincd avatar Nov 23 '22 04:11 baincd