Popular Python Extension for the Visual Studio Code Editor Boosts Debugging

The Python extension for the open source Visual Studio Code editor -- the most popular offering available in the marketplace -- has been updated with improved debugging functionality.

With more than 8.3 million installations, the extension reflects VS Code's embrace of Python, which involved hiring the original developer of the then-independent extension, taking over the project as its own, hiring more development help to further its functionality and bundling it with the Anaconda Python distribution.

The VS Code team published documentation for the extension that says: "It leverages all of VS Code's power to provide auto complete and IntelliSense, linting, debugging, and unit testing, along with the ability to easily switch between Python environments, including virtual and conda environments."

The team has continually improved the capabilities of the extension, and in the March update highlighted improved debugging functionality.

While the previous release (February) introduced a preview version of the debugger with limited feature support, the new release adds new enhancements to the preview.

"Debug configurations have been added for more app types: Django, PySpark, Pyramid, Watson and Scrapy," said Dan Taylor of Microsoft's Python engineering team. "The preview debugger is also now bundled with the extension so you no longer need to manually install ptvsd to try it out, simply add one of the Experimental Debugger configurations and start debugging."

Also, he said, the new release adds support for Django template debugging, support for debugging unit tests and Jinja template debugging support for apps other than Flask, in addition to closing 61 issues.

Taylor highlighted some of those issues and minor enhancements:

  • Pipenv improvements: added the ability to read Pipfile name from the environment variable, development-time packages are installed into dev-packages
  • Add support for the "it" locale
  • Improved extension load time
  • Unit test discovery banner is suppressed when test discovery failure is caused by syntax errors in test code
  • Conda installer is not used in non-conda environments
  • Prevent extension from displaying the wrong interpreter
  • Fixed high CPU Usage in wmic process on Windows
  • Stop autocomplete from appearing in comments

All of those and more are detailed in the changelog.

Developers who discover their own issues can submit them on the extension's GitHub site.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus


Subscribe on YouTube