Python Extension For Visual Code Updated
Written by Kay Ewbank   
Tuesday, 27 July 2021

The latest version of the Python Extension for Visual Studio Code has been released with a faster way to configure project roots via a new Pylance quick fix, and new debugger features.

Visual Studio Code (VS Code) is Microsoft's free to use source-code editor, and the Python extension for VS Code is being regularly improved so that VS Code has become a popular environment for Python coding.

vscodeicon

The latest version of the extension includes a quick fix designed to make it easier and faster to configure your Python project roots. Microsoft says they've been told developers have a common issue in VS Code of seeing diagnostics under import statements when they open new projects. Getting rid of the warnings has been tricky, involving configuring project roots by setting python.analysis.extraPaths to tell Pylance what search paths to use for import resolution to get the information necessary to provide IntelliSense features. The new release means developers can skip the step of editing settings.json and finding the correct paths; instead, Pylance will guide developers through the steps via the editor.

You can now hover over the diagnostic on the import statement and either click the lightbulb icon or “Quick Fix…” in the tooltip and Pylance will suggest search paths to add to python.analysis.extraPaths, where appropriate.

Two new debugger features have also been added, namely step into targets and function breakpoints.

The ability to choose which targets to step into when there is more than one possible option means that when the debugger stops at a breakpoint on a line that has multiple function calls, you can specify which one you want to step into by right-clicking on the editor and selecting “step into targets”.

The other improvement is support for function breakpoints. If you’re interested in inspecting just a certain function’s behavior, you can specify its name on the breakpoint window so that the debugger will stop its execution once it reaches the function.

VS Code is available now.

vscodeicon

More Information

Visual Studio Code Website

Related Articles

Microsoft Now Visionary Sponsor Of Python

VS Code Adds Terminal Tabs

Microsoft Reveals Java In VS Code Roadmap

Guido van Rossum Joins Microsoft

Microsoft Improves Python Support In VSCode

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Programmer Gifts - Pi For Xmas
13/12/2024

The holiday season is a good time to learn about computers - you have the time. But where to start? Our advice is to ignore the pudding and go for a Pi.



Linkerd Adds Egress And Rate Limiting
05/12/2024

Linkerd has announced a new version of its service mesh. It adds three major new features: egress traffic visibility and control; per-service rate limiting; and federated services.


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Tuesday, 27 July 2021 )