You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Java language server starting all the time in vs code #238
Hey, are you aware of an issue from any of the VS Code Java extensions where the java language server >starts and kills perf in code? I’m seeing this happening a lot and I’m not using any Java when it happens. >The lag is happening at really inopportune times especially when creating a debugger configuration. I’m >considering moving the Java stuff to the experimental instance, or isolate it somehow as its impacting >everything else.
We need investigate whether the issue related to the debug configuration generation or by java language server.
This is happening when I go to the debug mode and click add configuration. The problem is I'm editing C++ (or other files) and not Java when this occurs. When this occurs it causes the UI to not respond until the language service spins up. I'm just trying to create a c++ launch file but the Java extension is slowing it down.
Unfortunately, we use DebugConfigurationProvider to provide run-time initial debug configuration, which makes both our extension/java language server activated.
Most debug extensions contribute initial launch configs statically and declaratively through the package.json. In this case the DebugConfigurationProvider.provideDebugConfigurations isn't used and we could avoid the activation.
We can do little since vscode activates us at the early stage where I think a new declarative in package.json should be provided by vscode declaring we provides java runtime configuration. I will open a new issue at vscode tracking this issue.
Robert Alexander (@roalexan) Have you noticed that the new vscode-java has improved on the startup speed and ui to decrease the influence conflicting with other languages, eg: c++
The root cause is the dependency of the Java Extension (vscode-java). Whenever the debugger is activated (e.g. here when user presses F5, vscode needs to activate all debugger extensions to get available config templates), it activates Java Extension as well.
I think the solution would be:
Remove the hard-coded extension dependency of vscode-java
Check the activation status of vscode-java whenever it need to call upsteaming APIs. If vscode-java is not activated (indicating no Java project is found in current workspace), the debugger should simply mute itself.
With the proposed solution above, for the case mentiond in #238 (comment) , the Java Debugger related entries would not appear, and of course the vscode-java extension would not be activated as well.
Activity
robotdad commentedon Feb 23, 2018
Here is a screenshot of what I'm seeing.

This is happening when I go to the debug mode and click add configuration. The problem is I'm editing C++ (or other files) and not Java when this occurs. When this occurs it causes the UI to not respond until the language service spins up. I'm just trying to create a c++ launch file but the Java extension is slowing it down.
akaroml commentedon Feb 26, 2018
This bug does not seem related to the debugger. Can we track this issue at vscode-java side? Yaohai Zheng (@yaohaizh)
akaroml commentedon Feb 26, 2018
Marc Goodner (@robotdad) Could you share the workspace (screenshots or directory/file list) to help us investigate?
The Java language support should be activated when:
Does any of those cover your case?
andxu commentedon Mar 2, 2018
need to be fixed at Vscode side, see discussions at microsoft/vscode#33803 and microsoft/vscode#37918 and microsoft/vscode#39696 microsoft/vscode#37929, in short, it is caused by introducing onDebugInitialConfigurations and onDebugResolve microsoft/vscode#39677, need to be fixed at vscode side for declarative value in package.json
andxu commentedon Mar 2, 2018
Unfortunately, we use DebugConfigurationProvider to provide run-time initial debug configuration, which makes both our extension/java language server activated.
Andre Weinand (@weinand) commented on Nov 11, 2017
Most debug extensions contribute initial launch configs statically and declaratively through the package.json. In this case the DebugConfigurationProvider.provideDebugConfigurations isn't used and we could avoid the activation.
andxu commentedon Mar 20, 2018
We can do little since vscode activates us at the early stage where I think a new declarative in package.json should be provided by vscode declaring we provides java runtime configuration. I will open a new issue at vscode tracking this issue.
andxu commentedon Apr 19, 2018
Robert Alexander (@roalexan) Have you noticed that the new vscode-java has improved on the startup speed and ui to decrease the influence conflicting with other languages, eg: c++
akaroml commentedon Jul 15, 2019
Time to actually fix this. Yan Zhang (@Eskibear)
Eskibear commentedon Jul 15, 2019
The root cause is the dependency of the Java Extension (vscode-java). Whenever the debugger is activated (e.g. here when user presses F5, vscode needs to activate all debugger extensions to get available config templates), it activates Java Extension as well.
I think the solution would be:
With the proposed solution above, for the case mentiond in #238 (comment) , the Java Debugger related entries would not appear, and of course the vscode-java extension would not be activated as well.
testforstephen commentedon Aug 22, 2019
The commit is merged. Will be released 0.21.0