Python in Visual Studio Code – October 2021 Release

Luciana Abud

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

Discussion is closed. Login to edit/delete existing comments.

  • Alexandre Morais 0

    I liked the vscode theme, what is it?

    • Luciana AbudMicrosoft employee 0

      It’s called Horizon 😊

      • Ricardo Antonio Gutierrez Otero 0

        Hi Luicana,

        Could you help me?

        Thanks.

  • Ricardo Antonio Gutierrez Otero 0

    Hi Luciana,

    I’m very excited we can now debug Jupyter more if you take in account that using it under Databricks it’s something like being in heaven. I’m writing you because we, as a team, are having some minor problems with this new version.

    We are running a %run file.ipynb cell inside our code, but when we try to run it step by step it shows us an error locating a (it seems) temprary file. The other questions that we have is if it is possible to debug the %run command?. What we mean is: Is it possible that the book we are running in the %run command runs step bu step?.

    Could you help us?.

    Thanks a lot
    Thanks

    • Ricardo Antonio Gutierrez Otero 0

      Hi there,

      Any news?????

    • Luciana AbudMicrosoft employee 0

      Hi there. I don’t think debugging is fully supported for magic commands yet, but it would be worth filling a feature request for it at https://github.com/microsoft/vscode-jupyter. Thanks!

Feedback usabilla icon