Skip to content

Add breakpoint at specific location (different from current one) #1625

Description

I am attaching to debugpy once it hits an error.
How can I programmatically add a breakpoint, similarly to pdb's b(reak) [[filename:]lineno | function[, condition]] with debugpy?
How can I extract the currently enabled/disabled breakpoints in the current workspace in VSCode (from python)?

The following

debugpy.wait_for_client()
debugpy.breakpoint()

only sets a breakpoint at the current location.

How can I wait for a debug client once a breakpoint is hit?

It would also be great if you can point me to the relevant source code showing how the VSCode debugging extension itself does it to get the breakpoints and tell debugpy about their locations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions