Welcome to VS Code update for Java. Another busy and productive month. Debugger for Java and Java Test Runner extensions got new features. Before jump into details, we would like to remind Microsoft Build 2021 is coming. You will hear more about Java and VS Code this time, so please join us.
Inline Values and Customized Variables View for Debugging
By adopting a new debugger extension API, Debugger for Java extension is now able to show variable values inline in editor when stepping through source code.
You can enable this feature by selecting Files->Preferences->Settings menu, searching for “debug.inlineValues” on settings view, and selecting the option.
Customized variables view is also supported now. You can right-clicking the view to bring up customization menu.
Both features were demonstrated at VS Code 1.56 Release Party. Check out here for more details.
Generating Tests
Automatically generating testing method templates and importing testing packages is a handy feature to improve coding efficiency. Starting from April, you can generate the method templates directly from a test file. In May, we will also add support for generating from a source file.
To generate testing method templates, open or create a test file under project’s test folder, right-click on file editor to invoke context menu, select “Source Action…” and then “Generate Test…”, and finally select methods to generate.
Note: for generating from a test file, testing dependency need be added into your project.
Enhancements
- Java 16 is supported.
- Refined creating Maven project experience. Now, you will be promoted to open project right after the completion of creation.
Try it out
Please don’t hesitate to give it a try! Your feedback and suggestions are very important to us and will help shape our product in future.
- Learn more about Java on Visual Studio Code.
- Explore our step by step Java Tutorials on Visual Studio Code.
0 comments