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

  • Mastering AI Development and Building AI Apps with GitHub Copilot

    Two Microsoft experts explain how GitHub Copilot is evolving from a coding assistant into a broader platform for building, customizing and testing AI-powered developer workflows.

  • VS Code 1.123 Adds Agent Session Sync, 1M Context Windows

    Microsoft released Visual Studio Code 1.123 on June 3, adding agent-focused features, larger model context support, integrated browser updates and a new delay for some automatic extension updates.

  • Copilot Billing Shock Hits Developers

    Developer complaints about GitHub Copilot's new usage-based billing model have centered on unexpectedly rapid AI credit consumption, and neither GitHub nor Microsoft has responded directly to the backlash, though they have previously published guidance to lessen model usage costs.

  • Hands On with GitHub Copilot App Technical Preview: Turning a Blazor Issue into a PR

    GitHub's brand-new Copilot desktop app, in technical preview, handled a small Blazor issue from planning through pull request creation, but the hands-on test also showed why developers still need to verify agent work in the running app before merging.

Subscribe on YouTube