Python in Visual Studio Code – October 2021 Release

Luciana

We are pleased to announce that the October 2021 release of the Python Extension for Visual Studio Code is now available. You can download the Python extension from the Marketplace, or install it directly from the extension gallery in Visual Studio Code. If you already have the Python extension installed, you can also get the latest update by restarting Visual Studio Code. You can learn more about Python support in Visual Studio Code in the documentation.

In this release we closed a total of 88 issues, and it includes:

  • Debugging support for Jupyter Notebooks
  • A new Python walkthrough
  • Improvements to the debugging experience for Python files and projects

If you’re interested, you can check the full list of improvements in our changelog.

Debugging support for Jupyter Notebooks

We’re excited to announce that you can now debug your Python cells on Jupyter notebooks!

Debugging a Jupyter notebook cell

To try it out, make sure you have ipykernel v6+ installed in your selected kernel. Then set a breakpoint, select the Debug Cell command from the drop-down menu next to the play button and start inspecting your code with all the features the debugger has to offer!

New Python walkthrough

We’re excited to announce that this release includes a walkthrough with some basic set up steps to improve the getting started experience for Python in VS Code.

Python walkthrough in VS Code with basic set up steps

The walkthrough covers steps such as Python installation, selection of an interpreter for your project and how to run and debug Python files in VS Code. We hope this will be a quick and helpful guide for those learning or starting Python for the first time in VS Code!

Improvements in the debugging experience for Python projects

When working with workspaces with no launch.json configuration present, the Python extension would display a debugger configuration menu every time you would debug your Python file or project. This could be particularly annoying when debugging a web application with custom arguments (like Flask, Django or FastAPI, for example).

Now you no longer need to provide a configuration every time you start debugging, as the first selection you make is reused for the rest of the session.

Caching of Python debug configuration

Other Changes and Enhancements

We have also added small enhancements and fixed issues requested by users that should improve your experience working with Python in Visual Studio Code. Some notable changes include:

  • python.testing.cwd setting is no longer ignored when discovering or running tests. (#8678)
  • Upgraded to Jedi 0.18 and enabled it behind the language server protocol. Remove Jedi-related settings python.jediMemoryLimit and python.jediPath, since they are not used with the new language server implementation. (#11995)
  • Removed support for rope, ctags and pylintMinimalCheckers setting. Refactoring, syntax errors and workspace symbols are now supported via language servers. (#10440, #13321, #16063)
  • Default value of python.linting.pylintEnabled has been changed to false. (#3007)

Special thanks to this month’s contributors:

  • Anupama Nadig: Fix casing of text in unittest patterns quickpick. (#17093)
  • Erik Demaine: Improve pattern matching for shell detection on Windows. (#17426)
  • ilexei: Changed the way of searching left bracket [ in case of subsets of tests. (#17461)

Be sure to download the Python extension for Visual Studio Code now to try out the above improvements. If you run into any problems or have suggestions, please file an issue on the Python VS Code GitHub page.

6 comments

Leave a comment