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


Amazon Releases MemoryDB For Redis
02/09/2021

Amazon has released Amazon MemoryDB for Redis, a new Redis-compatible, durable, in-memory database. Amazon says MemoryDB makes it easy and cost-effective to build applications that require microsecond [ ... ]



MAUI Compatibility For Xamarin Community Toolkit
06/09/2021

The Xamarin Community Toolkit team has announced two new .NET MAUI-compatible versions of the toolkit, a toolkit and a markup toolkit. .NET MAUI is the .NET Multi-platform App UI, a framework for buil [ ... ]


More News

square

 



 

Comments




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

Last Updated ( Tuesday, 27 July 2021 )