News

What's New for Python, Java in Visual Studio Code

Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Java, of course, is a favorite for cloud developers on Azure and other cloud platforms, while Python is the darling language for AI, data science, machine learning and other workloads. Those latter workloads are all the rage in these days of generative AI breakthroughs, so it's no wonder that Python-related extensions in the VS Code Marketplace (Python, Pylance and Jupyter) account for the top three most popular tools, cumulatively installed a staggering 287 million times.

VS Code Python Extensions
[Click on image for larger view.] VS Code Python Extensions (source: Microsoft).

For the Python and Jupyter extensions, Microsoft highlighted the following updates:

  • Improved debug config flow for Flask and Django: "Creating launch configurations for Flask and Django apps just got easier!" Microsoft said in an April 4 announcement. "Improvements have been made to detect possible startup files in your workspace when creating a launch.json for your web app."
  • Module and import analysis on Jupyter's Run Dependent Cells with Pylance: Dependency analysis for Jupyter cells is enhanced in the latest Pylance pre-release. One key change: Pylance helps Jupyter understand module imports, which is especially useful for cells that import a module previously defined in a cell.
  • Hatch environment discovery: Default behavior now sees Hatch environments being discovered and activated like other common environments including Venv, Conda and Poetry. "In the case of Hatch where an explicit environment identifier is not registered, the extension can determine the environment type (Hatch) from the environment locator."
  • Automatic environment selection for pipenv, pyenv, and Poetry projects: The Python extension now automatically selects the corresponding environment for pipenv, pyenv or Poetry projects. Previously, the extension correctly discovered these environments but selected the default global interpreter, requiring manual selection of the appropriate environment for the workspace.
  • Report Issue command improvements: "The Python and Python Debugger extensions have adopted changes making it easier for you to report issues to our repos! Filing an issue with the Report Issue command (workbench.action.openIssueReporter) does most of the heavy lifting, prompting you for additional info so our team can efficiently triage the problem you are encountering."

Java Updates
Java enhancements, meanwhile, include: Spring Boot updates, including a preview of new refactoring capabilities for version upgrades, along with new functionality that can change log levels on the fly and add Spring Boot starters from within a pom.xml file. Also, testing coverage is now available in the stable version of Visual Studio Code.

Speaking of the new refactoring preview available for version upgrades, the dev team said: "The feature to automatically upgrade your projects to the latest Spring Boot version now allows you to choose between applying those changes directly to your project or previewing them in a refactoring preview. The refactoring preview gives you an exact diff for all the changes that the automated version upgrade process produced and allows you to select which changes to apply and which not. Please note that currently all changes are unchecked, so you need to select the changes you want to apply manually."
Upgrading to Lates Spring Boot Version
[Click on image for larger view.] Upgrading to Lates Spring Boot Version (source: Microsoft).

These new capabilities and more are available in the Extension Pack for Java, which has been installed more than 26 million times.

The extension bundle provides many different tools, including:

More information on Java in Visual Studio Code is available in the aptly named Java in Visual Studio Code documentation.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Build Your First AI Applications with Local AI

    "AI right now feels like a vast space which can be hard to jump into," says Craig Loewen, a senior product manager at Microsoft who is helping devs unsure about making that first daunting leap.

  • On Blazor Component Reusability - From Day 0

    "We want to try to design from Day One, even Day Zero, with reusability in mind," says Blazor expert Allen Conway in imparting his expertise to an audience of hundreds in an online tech event on Tuesday.

  • Decision Tree Regression from Scratch Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of decision tree regression using the C# language. Unlike most implementations, this one does not use recursion or pointers, which makes the code easy to understand and modify.

  • Visual Studio's AI Future: Copilot .NET Upgrades and More

    At this week's Microsoft Ignite conference, the Visual Studio team showed off a future AI-powered IDE that will leverage GitHub Copilot for legacy app .NET upgrades, along with several more cutting-edge features.

  • PowerShell Gets AI-ified in 'AI Shell' Preview

    Eschewing the term "Copilot," Microsoft introduced a new AI-powered tool for PowerShell called "AI Shell," available in preview.

Subscribe on YouTube