vscode-java: Extension keeps building code, never finishing
I’m trying to use the vscode-java extension in VSCode, but it keeps on building the same source code (it seems) again and again, hogging 100% CPU.
I see lines like this in the Task - Java Build Status
Terminal: 1e7bf092 Building: 72% Compiling foo/src/test/java/fi/bar/xyzzy/controller [720/1000]
. After it completes, it starts again.
I set the “Trace” setting in Settings to “messages”, and saw this in the logs multiple times: [Trace - 9:47:08 AM] Sending notification 'workspace/didChangeWatchedFiles'.
, followed by a bunch of [Trace - 9:47:08 AM] Received notification 'language/progressReport'.
My guess is that it somehow thinks that some of the watched files have changed. How can I find out which files are causing the build to re-trigger?
Environment
- Operating System: macOS Catalina 10.15.3
- JDK version: jdk1.8.0_161
- Visual Studio Code version: 1.43.2
- Java extension version: 0.58.0
Steps To Reproduce
Unfortunately it only happens in our fairly large proprietary project.
Current Result
Keeps rebuilding the code forever.
Expected Result
Should stop building after a reasonable time.
Additional Informations
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 7
- Comments: 22 (3 by maintainers)
I had a similar issue; stuck building and would never finish. I checked out the troubleshooting guide here and found that cleaning out my workspace directory solved the problem for me (steps from link pasted below):
I tried the F1 “Java clean …” action but the issue is still occurring.
I make no changes to the Java code or to any file, just browsing the project. And I notice in the “Java Build Status” terminal that building/validation/publishing/registering/etc… goes in a loop. Then, I see via htop command that the Redhat extension uses lots of CPU.
I think the issue is still happening.
I’ve been experiencing a similar issue. When opening a java project, the java build status is stuck at 68% Refreshing. Also, the extension Java Project and Spring Boot Dashboard never load.
I have googled and I haven’t found a solution.
Enviroment:
@cammarb Could you check https://github.com/redhat-developer/vscode-java/issues/2020#issuecomment-880272712
This problem may be because java process extension may be killed by another extension, my problem was seeing java extension doing its thing starting the projects normally and seconds later just stopped and getting stuck in an infinite loop trying to run. My solution was disbaling ALL extensions except java debugger and java redhat extension, restarting vs code and then I saw java finally working in vs code, then re enabled all the extensions and I was good to go
Hope it works if you’re having that problem