With an estimated 8 million Java developers using Microsoft’s Visual Studio Code (VS Code), Java is one of the most important programming languages for the open-source editor. Microsoft recently made VS Code more user-friendly with a new update.
Microsoft offers developers a Java Extension Pack to facilitate the development process in VS Code. This extension pack includes Language Support for Java Extension from Red Hat, Maven for Java, Java Test Runner, Java Dependence View and Microsoft’s Visual Studio IntelliCode. The new update comes in the form of various changes to the extensions.
Status bar update and automatic restructuring
With the update, Java developers can now immediately see in the VS Code status bar which Java language level they are using. Previously, you had to open a project for this. Clicking on the level will take a developer to the java.configuration.runtimes settings. Here the Java SE Development Kit (JDK) can be configured. To use this new option you need the latest version of Red Hat’s Language Support for Java and the active editor tab must be set as a .java file.
In addition, developers now have the ability to restructure packages when renaming folders automatically. When this option is used for the first time, the user is asked whether this should always be done automatically. The alternative is that there is always a preview before the restructuring is carried out.
Debugger per process ID
With the update, developers can now use the Java Debugger extension to activate the debugger per process ID. This requires the latest version of the extension, and users must have set the “java: Attach to Process” option.
Something else that the update brings with it is that VS Code users now have a command to create a new Java project with Maven support. There is also an “Import Java projects in Workspace” command. This allows a user to add a module to an open project without restarting the window.
The new update builds on earlier VS Code updates, which Microsoft launched in March. It reduced irrelevant warnings and introduced support for the SonarLint extension. This enables developers to monitor the quality of their code and detect security issues faster.