Java on VS Code Update Enhances Debugger and Test Runner

The latest update of Java on Visual Studio Code (VS Code), announced last week, focused on improving the code editor's debugging and testing features.

For Java developers using Microsoft's streamlined code editor, debugging is provided by the lightweight Java Debugger, which is based on the Java Debug Server. Testing is enabled by the Java Test Runner extension, a lightweight extension for running and debugging Java test cases.

Here's a snapshot of what's new in the latest update:

Inline Values and Customized Variables View for Debugging: the Debugger for Java extension, which is available as a standalone solution or in the extension pack, can now show variable values inline in the editor while stepping through source code, thanks to the adoption of a new debugger extension API.

Generating Tests: Using the Java Test Runner extension, developers can now generate the method templates directly from a test file, with more functionality—specifically support for generating them from a source file—coming next month. "Automatically generating testing-method templates and importing testing packages is a handy feature to improve coding efficiency," said Microsoft's Yaojin Yang, senior program manager in Microsoft's Developer Division, in a statement.

Java 16 Now Supported: Java 16 reached general availability in March, boasting 17 enhancements ranging from a Vector API (incubator) to sealed classes (preview).

Refined Creating Maven Project Experience: This improves working with the popular build automation tool. "Now, you will be promoted to open project right after the completion of creation," Yaojin said.

In VS Code, Java tooling is provided through a collection of extensions bundled in the Java Extension Pack, currently available in preview from the VS Code Marketplace. The popular extension pack has been installed more than 7.8 million times, Microsoft says. The extensions can be downloaded with the Java Pack Installer, which can be found on Microsoft's Java in Visual Studio Code page.

About the Author

David Ramel is an editor and writer for Converge360.