Python Extension for Visual Studio Code gets pinpoint debugging – Market Research Telecast

The monthly update of the Python Extension for Visual Studio Code has been released. The extension from Microsoft has new functions for the source code editor’s handling of Python code on board, including new features for debugging and extended Jedi support. The latest version of the extension can be obtained either from the Visual Studio Code Marketplace or directly from the Extension Gallery in Visual Studio Code. If the extension is already installed, a restart of Visual Studio Code is sufficient.

In the current release of the Python extension, two additional options are available for debugging. The first is the ability to let developers choose which target they want to step into on a line of code when multiple options are available. This is useful in this case, for example:

Python Extension for Visual Studio Code: mögliche Targets im Python-Debugger

(Image: Microsoft)

Up to now, it was necessary to enter the unwanted code sections and step out of them until the desired, for example, the call generate_wordcloud, was achieved. This will no longer apply with the July release, because the target can now be selected directly:

Python Extension for Visual Studio Code: Auswahl des Targets im Python-Debugger

(Image: Microsoft)

The second new debugging feature are function breakpoints. They come into play when it comes to investigating only the behavior of a specific function. To do this, select their name in the breakpoint window. The debugger then stops executing the code as soon as the named function is reached.

Another innovation is a quick fix for resolving previously unclear import statements in new projects. So far, manual settings were on python.analysis.extraPaths required to show Pylance the correct search paths for the import in order to get information needed for IntelliSense. Instead, Pylance, Microsoft’s Language Server for the popular Python programming language, now independently displays suggestions for search paths. Either click on the lightbulb or select “Quick Fix …” in the tooltip.

In addition, it is now possible to rename modules with the Python analysis tool Jedi, which previously led to an error. The update also fixes some additional bugs.

For more information on the latest edition of the Python Extension for Visual Studio Code, see found in a blog post.


Article Source