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

  • 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