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


GitHub Universe AI Announcements - Copilot And Spark
30/10/2024

GitHub has announced several improvements for developers at Universe, its annual conference. Developers will get multi-model Copilot and GitHub Spark, an AI-native tool for building applications in na [ ... ]



Ai-Da's Portrait of Alan Turing At Auction
01/11/2024

Sotheby's Digital Art Day Action, now underway, features a large-scale portrait of  Alan Turing created by Ai-Da, the humanoid robot artist whose work, including this canvas, was exhibited at the [ ... ]


More News

espbook

 

Comments




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

Last Updated ( Tuesday, 27 July 2021 )