News

Test Explorer Added to VS Code Python Tool

A new Test Explorer highlights the February release of the Python extension for Visual Studio Code, by far the most popular tool in the marketplace, installed more than 6.5 million times.

The Python extension for Visual Studio Code enables features such as linting, debugging, IntelliSense, code navigation, code formatting, refactoring, unit tests, snippets and so on.

Reflecting VS Code's going "all in" on Python, the tool gets new functionality on a monthly basis, with the Test Explorer leading new improvements that also include debugging enhancements, new interactive window functionality and more.

"This release includes the ability to visualize, navigate and run unit tests through a test explorer, a feature that is commonly requested by our users," said Dan Taylor, principal program manager on the Python engineering team, in a blog post yesterday (Feb. 26). "To access it, you can run the command Python: Discover Unit Tests from the Command Palette (View -> Command Palette). If the unit test feature is disabled or no test framework is configured in the settings.json file, you'll be prompted to select a framework and configure it. Once tests are discovered, the Test Explorer icon will appear on the Activity Bar."

On the debugging front, breakpoint validation ensures a misplaced breakpoint will automatically be moved to a functional location. "If a breakpoint is set on a line where breakpoints are invalid (e.g. blank lines, pass statement, lines in the middle of a multi-line statement), then it's automatically moved to the nearest preceding valid line," Taylor said. "This way the breakpoints added are ensured to be hit. Previously the debugger would continue running past invalid breakpoints, causing confusion or wasted time."

The last major improvement called out by Taylor involves the Interactive window previously added to the tool and yet another top-requested feature: the ability to run code selections in the window without needing to define code cells. "With this update, you can now send any code line/selection to run in the Python Interactive window using command 'Python: Run Selection/Line in Python Interactive window,' " Taylor said.

The post also lists numerous other fixes, changes and tweaks for the free, open source tool, which as of this writing has been installed 6,588,613 times, downloaded 31,621,863 times and has earned an average 4.5 rating (scale to 5) from 220 developers who provided review feedback.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Microsoft Revamps Fledgling AutoGen Framework for Agentic AI

    Only at v0.4, Microsoft's AutoGen framework for agentic AI -- the hottest new trend in AI development -- has already undergone a complete revamp, going to an asynchronous, event-driven architecture.

  • IDE Irony: Coding Errors Cause 'Critical' Vulnerability in Visual Studio

    In a larger-than-normal Patch Tuesday, Microsoft warned of a "critical" vulnerability in Visual Studio that should be fixed immediately if automatic patching isn't enabled, ironically caused by coding errors.

  • Building Blazor Applications

    A trio of Blazor experts will conduct a full-day workshop for devs to learn everything about the tech a a March developer conference in Las Vegas keynoted by Microsoft execs and featuring many Microsoft devs.

  • Gradient Boosting Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the gradient boosting regression technique, where the goal is to predict a single numeric value. Compared to existing library implementations of gradient boosting regression, a from-scratch implementation allows much easier customization and integration with other .NET systems.

  • Microsoft Execs to Tackle AI and Cloud in Dev Conference Keynotes

    AI unsurprisingly is all over keynotes that Microsoft execs will helm to kick off the Visual Studio Live! developer conference in Las Vegas, March 10-14, which the company described as "a must-attend event."

Subscribe on YouTube