News

Spring Functionality, Debugging Improved in Java on VS Code Update

The regular monthly update to Java on Visual Studio Code sees multiple improvements to Spring functionality along with a couple community contributions that enhance debugging.

The dev team maintains Java tools available in the code editor's marketplace, including the Extension Pack for Java, which has been installed nearly 14.5 million times. The Spring Framework, meanwhile, is a Java platform that is also popular, providing comprehensive infrastructure support for developing Java applications.

In the August 2022 update, the team provided a better getting-started experience for Spring Initializer, which is used to create a new project, in part by generating a HELP.md file that provides useful information for coders looking to get started with Spring.

"Previously, many developers would not realize this file was there or it was simply ignored," said Microsoft's Nick Zhu in an Aug. 25 announcement. "It would be helpful if this file can be automatically opened in Visual Studio Code. This feature is added recently so that Spring developers can have a more smooth getting started experience."

To use the new features, developers need to install the Spring Boot Extension Pack in addition to the Extension Pack for Java.

Using the new Spring Initializer feature is illustrated in this animated GIF:

Using Spring Initializer in Animated Action
[Click on image for larger view.] Using Spring Initializer in Animated Action (source: Microsoft).

Another new feature affects Spring beans, which are objects that form the backbone of an application, managed by the Spring IoC container.

"When developer starts a Spring app from the Spring dashboard, just wait for the beans to connect to the live process and go 'green,' then the bean property information will automatically appear right next to the bean name," Zhu said. "You will see if the bean is a singleton, prototype and so on. If a bean is defined by developer and not by Spring framework, you will also see 'defined' as well."

Microsoft also beefed up functionality for Maven and Gradle. Maven allows a library consumer to override a dependency by version. Gradle, often used with Maven, supplies customizable dependency selection and substitution rules, which can help developers handle unwanted project-wide dependencies.

"We have heard from developers that they want better Maven and Gradle integration in our extensions, and this is one of the areas we will keep working on," Zhu said. "In our latest release, we have added Maven and Gradle menu items in our Java Project Explorer so that developers can directly access certain actions in a more convenient way. To use this feature, developers just need to right click on an application node inside the Java Project Explorer view in a Maven or Gradle project and find the actions at the bottom of pop up menu."

On the debugging front, the two community contributions improve support for method breakpoints and also show target VM exceptions as result in evaluate requests.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube