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


Microsoft Introduces .NET Smart Components
01/04/2024

Microsoft has provided a set of .NET Smart Components, described as a set of genuinely useful AI-powered UI components that you can quickly and easily add to .NET apps. The components are prebuilt end [ ... ]



Conference Times Ahead
29/03/2024

Following a well-established pattern both Google's and Microsoft's Developer Conferences will take place in May while Apple follows on in June. Here are the dates plus what to expect.


More News

raspberry pi books

 

Comments




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

Last Updated ( Tuesday, 27 July 2021 )