News

Python in Visual Studio Code Update Adds Debugger, Debugpy 1.0

The new Debugpy debugger for Python in Visual Studio Code hits version 1.0 in the latest update of the Python tooling for the open source, cross-platform code editor.

Python for VS Code comes with the Python extension in the editor's marketplace, which has been installed a whopping 26.6 million times, making the most popular tool in the marketplace by far.

Microsoft updates the VS Code Python tooling regularly, and in March announced Debugpy, which just hit version 1.0 status, according to an Oct. 28 blog post.

Debugpy offers a great number of features that can help you understand bugs, errors and unexpected behaviors in your code," said Luciana de Melo e Abud, program manager. "You can find an extensive list on our documentation, but check below for some of our favorite ones!" (Note that the documentation link wasn't working for this reporter at press time.)

The post goes on to describe three ways of debugging:

  • Debug web apps: The tool supports live reload of web applications, Django and Flask apps, for examples. So when edits are made to an application, a restart of the debugger isn't required to apply them, because the web server is automatically reloaded in the same debugging session upon changes being saved.
    Live Reload in Animated Action
    [Click on image for larger, animated GIF view.] Live Reload in Animated Action (source: Microsoft).
  • Debug local processes: Developers can choose to attach debugpy to one of a list of local process that can be displayed. If a process ID is already known, it can be added directly to the "Attach using Process Id" configuration in the launch.json file.
  • Debug remotely: This can be done in two ways:
    • Remote Development Extensions -- "You can use debugpy to debug your applications inside remote environments like Docker containers or remote machines (or even in WSL!) through the Remote Development extension. It allows VS Code to work seamlessly by running a light-weight server in the remote environment, while providing the same development experience as you get when developing locally."
    • Remote attach -- "You can also configure the debugger to attach to a debugpy server running on a remote machine. All you need to provide is the host name and the port number the debugpy server is listening to in the remote environment."
  • The post also lists a couple of notable changes:

    • Fix exporting from the interactive window. (#14210)
    • Do not opt users out of the insiders program if they have a stable version installed. (#14090)

    About the Author

    David Ramel is an editor and writer for Converge360.

    comments powered by Disqus

    Featured

    • Visual Studio 'Tea & Technology' Video Miniseries Starts Next Week

      The goal of the miniseries is to provide an insider's snapshot look at some of the people who contribute to shaping the Visual Studio IDE every day.

    • Microsoft Releases OpenJDK 21 Build for Java Jockeys

      Microsoft today announced its "Microsoft Build of OpenJDK 21," taking advantage of new features and functionality in Java 21.

    • 'Dev Home' Update Leads Developer Goodies in AI-Powered Windows 11 Update

      Along with today's new AI-powered Windows 11 update come new goodies for developers, including a new edition of Dev Home, a preview offering described as a "control center" providing coding-focused features and functionality.

    • Community Dev Gives VS Code Python Some YAPF

      The latest update to Python in Visual Studio Code includes a new extension for Python formatting that was contributed by a member of the open source community.

    Subscribe on YouTube