February 6th, 2025

Python in Visual Studio Code – February 2025 Release

Courtney Webster
Program Manager

We’re excited to announce the February 2025 release of the Python, Pylance and Jupyter extensions for Visual Studio Code!

This release includes the following announcements:

  • No-config debugging
  • Test discovery cancellation
  • Launch the Native REPL from the terminal
  • Go to Implementation with Pylance
  • AI Code Action: Generate Symbol (Experimental)

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

No-config debugging

After listening to community feedback that configuring the debugger can be difficult, we are introducing a no-config debugging experience! We are excited to say that this is now available in the Python Debugger extension!

As the name implies, this workflow allows you to start the debugger without creating or managing a Python debug configuration in launch.json. Simply replace python with debugpy prefixed in your run command in the terminal, for example debugpy <script.py or module>, to start a debug session.

NOTE: We also recommend adding the following to your User settings.json file: "python.experiments.optOutFrom": ["pythonTerminalEnvVarActivation"] as this experiment is known to conflict with this new feature. You can still activate your terminals using normal activation commands.

You’ll see feedback in the terminal that a debug session is starting and the debug toolbar pop up in the editor. Set breakpoints in the UI and open up the debug toolbar to use all of VS Code’s debugging functionality.

Gif showing no config debugging in the Python Debugger extension.

For more information and troubleshooting tips, check out the no-config debugging wiki. We would love to hear your feedback on this new feature – you can open issues and feature requests in our repository.

Test discovery cancellation

When triggering test discovery from the Test Explorer UI, you can now cancel an ongoing test discovery call. Use the Cancel Test Refresh button, which appears in replacement of the Refresh button during discovery.

Screenshot showing the test panel with the Cancel Test Refresh button.

Launch the Native REPL from the terminal

You are now able to launch a VS Code Native REPL from your terminal REPL. By setting python.terminal.shellIntegration.enabled to true, a clickable link will display in the Python REPL in the terminal, allowing you to directly open the VS Code Native REPL from the terminal. This will eventually be set to true by default, but for now you can enable it manually.

The Native REPL allows you to iteratively run Python code similar to the Python REPL located in the terminal enhanced with features such as IntelliSense and syntax highlighting.

Video showing a link to the Native REPL from the terminal REPL.

Go to Implementation with Pylance

Pylance now has support for Go to Implementation, which allows you to more quickly navigate to the implementation of a function or method directly from its usage. This feature is particularly helpful when working with inherited classes.

Screenshot showing go to implementation view on Python code.

AI Code Action: Generate Symbol (Experimental)

There’s a new experimental AI Code Action for generating symbols with Pylance and Copilot. To try it out, you can enable the following setting: "python.analysis.aiCodeActions": {"generateSymbol": true}.

With this enabled, once you define a new symbol, such as a class, function, or variable, you can select the Generate Symbol with Copilot Code Action and let Copilot handle the implementation! Afterward, you can leverage Pylance’s Move Symbol Code Actions to relocate it to a different file.

Video showing Pylance's create symbol code action with Copilot.

Other Changes and Enhancements

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

  • This release is the last release with support for Python 3.8 in all our extensions (Python extension, Python Debugger, Python Environments, and Python tooling extensions).
  • The Python Environments extension APIs now support grouping environments by environment managers and allows package managers to control the common package lists, providing more flexibility to providers.

We would also like to extend special thanks to this month’s contributors:

Try out these new improvements by downloading the Python extension and the Jupyter extension from the Marketplace, or install them directly from the extensions view in Visual Studio Code (Ctrl + Shift + X or ⌘ + ⇧ + X). You can learn more about Python support in Visual Studio Code in the documentation. If you run into any problems or have suggestions, please file an issue on the Python VS Code GitHub page.

Category
Python
Topics
python

Author

Courtney Webster
Program Manager

0 comments