Skip to content

Breakpoints can be set on blank/comment-only lines but never resolve or warn #2013

Description

Environment\n- OS: Linux\n- Python: 3.13 (debug session shows /usr/lib/python3.13/...)\n- Debug adapter: debugpy (via VS Code Python extension), e.g. ms-python.debugpy-2025.18.0-linux-x64\n- Frontend: VS Code Run & Debug\n\nSteps to Reproduce\n1. In a Python file, create a breakpoint on a line that is not an executable statement (blank line or comment-only line).\n2. Start debugging normally and run through code that would execute the surrounding executable lines.\n\nActual Result\n- The breakpoint can be set/accepted in the UI, but it never triggers.\n- There is no clear indication that the breakpoint line has no executable code and therefore cannot be hit.\n\nExpected Result\n- The debugger should either\n - prevent breakpoints on non-executable lines, or\n - clearly mark them as unverified / not resolved, and/or\n - resolve them automatically to the nearest executable line.\n\nNotes / Example\nIn this codebase, a breakpoint placed on a blank line between executable statements never resolves or triggers, even though the immediately adjacent executable lines do execute.\n\nWorkaround\nPlace breakpoints on actual executable statement lines instead.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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