Default launch configurations provided by Language Server can modified in launch.json
file using intellisense for available options.
Class level refactorings as well as variable refactorings are supported in VSCode via Apache NetBeans extension. See following screenshots:
Some refactorings are two steps with like Override method ... where method to be overriden is selected in 2nd step:
NetBeans Language Server provides Test Explorer view which allows to run all tests in a project, examine the results, go to source code and run particular test.
Experimental Support
NetBeans Language Server allows Java like debugging of native images produced by GraalVM EE native-image tool. It is provided using GDB and via new Run configuration named Launch Native Image. This experimental feature works now only on Linux with certain version of GDB, see above. GraalVM Enterprise Edition is needed as it produces full debug information for native images, at this time.
In order to debug native image applications it is necessary to build such native image with debug information available. It can be done by providing following switches for native-image tool:
-g -O0
or-H:Debug=2 -H:Optimize=0
.It is possible to use Native-Image Maven Plugin to run native-image builds for Maven projects. In this case add following <buildArgs>
into plugin <configuration>
:
<buildArgs> <buildArg>-g</buildArg> <buildArg>-O0</buildArg> </buildArgs>
Setting project's Maven pom.xml to skip native-image build everytime when project is being built is a good practice.
When native image is built, including debug info then add Launch Native Image configuration to launch.json. Select it in Run & Debug activity window and press F5 to debug Java source code on native image.
The user projects are built, run and debugged using the same JDK which runs the Apache NetBeans Language Server. The JDK is being searched in following locations:
netbeans.jdkhome
setting (workspace then user settings)java.home
setting (workspace then user settings)JDK_HOME
environment variableJAVA_HOME
environment variableAs soon as one of the settings is changed, the Language Server is restarted.
Apache NetBeans Language Server extension isn't the only Java supporting extension. To avoid duplicated code completion and other misleading clashes the extension disables certain functionality known to cause problems, this is done per Workspace.
This behavior can be disabled by setting netbeans.conflict.check
setting to false
.
Read building instructions to help Apache community to improve the extension.