August 4th, 2022
heart6 reactions

Python in Visual Studio Code – August 2022 Release

Kartik Raj
Software Engineer

We’re excited to announce that the August 2022 release of the Python and Jupyter extensions for Visual Studio Code are now available!

This release includes the following improvements:

  • Automatic debug configurations for web apps
  • Improvements to the Getting Started Experience
  • Setting to configure the display of the interpreter information on the status bar
  • A new Python Tools extension template
  • Remove all unused imports with Pylance
  • Double click to accept type hints with Pylance
  • Copy output image in Jupyter cells
  • Go to most recently failed cell

If you’re interested, you can check the full list of improvements in our changelogs for the Python, Jupyter and Pylance extensions.

Automatic debug configurations for web apps

To simplify the process of setting up VS Code to run and/or debug your web applications, this release includes new automatic debug configurations for projects that use Flask, Django or FastAPI.

When you open the Run and Debug view in VS Code (Ctrl + Shift + D or ⌘+ ⇧ + D) and there is no debugger configuration (i.e., no launch.json file) on your workspace, you will see an “show all automatic debug configurations” option. If your project is a web application that follows the format expected by Flask, Django or FastAPI, once you click on that option you will be able to see debug configurations that were dynamically created to execute and debug your project. Now you can just select it to start catching all the bugs!

Debugging a FastAPI application by selecting an dynamically created debug configuration for FastAPI. Theme: Pink-Cat-Book

Improvements to the Getting Started Experience

The Python extension walkthrough has been improved to more easily guide users to installing Python when needed, and selecting it in VS Code. When Python is not installed on a Windows machine, selecting the “Install Python” button from the walkthrough will open the Python app in the Microsoft Store. When on Linux or macOS, the displayed installation instructions will be automatically run in the terminal.

Another improvement related to the getting started experience is that notifications for selecting the interpreter are now only shown when an interpreter is required (e.g. when running or debugging a file, or a tool such as a linter or formatter), and no longer on start-up. Other notification prompts have also been improved to be more precise about errors and suggested changes.