Skip to content

Fix breakpoints in archive-like directories (port debugpy #2086) - #329

Open
lollipoll wants to merge 1 commit into
fabioz:mainfrom
lollipoll:fix/archive-path-boundaries
Open

lollipoll wants to merge 1 commit into
fabioz:mainfrom
lollipoll:fix/archive-path-boundaries

Conversation

@lollipoll

Copy link
Copy Markdown

Port microsoft/debugpy#2086 to fix archive-boundary detection in PyDev.Debugger. Ordinary directory names such as .zipx, archive.zip_ and bar.egg-info currently get split as archives, so breakpoints in existing files are rejected as nonexistent. The same split can also make a missing path appear to exist inside a similarly named ZIP.

The implementation and regression tests are by Yashvardhan Thanvi in microsoft/debugpy#2086 (commits 495e26689f1d6c90b211a067ec5f83b2a0fae5e2 and 1d42f0abe74aec8e8b543233a28ef5bf732d8854). This ports those changes without the debugpy vendoring prefix. Archive components are checked from left to right, require an actual path boundary, and skip directories on disk that happen to end in .zip or .egg.

Fixes #265.

Validation on Linux / Python 3.12.3:

  • The 21 ported path regression cases all fail on unmodified PyDev.Debugger main and pass with the port.
  • The selected path, API and filtering suite passes 36 tests with six platform skips.
  • A separate local probe of real PyDB JSON launch/setBreakpoints handling improves from 5/14 to 14/14 correct cases, including rejecting a nonexistent lookalike path. This checks validation and registration, not an actual traced breakpoint hit or editor interaction.
  • The ported socket integration test collects successfully but was not run in this restricted environment; it remains included for CI.
  • git diff --check passes. Ruff reports the same 36 existing lint findings and the same two files needing formatting on the unmodified base; the port does not add new lint findings.

AI assistance: OpenAI Codex retrieved and ported the existing contribution, ran the local checks, and prepared this submission. The original implementation and tests remain credited to their author. Maintainer review and CI remain necessary before merging.

Port Yashvardhan Thanvi's implementation and regression tests from
microsoft/debugpy#2086 into PyDev.Debugger without the vendoring prefix.
This preserves the original implementation author's credit; lollipoll
prepared and independently validated the upstream port with Codex.

Original commits:
495e26689f1d6c90b211a067ec5f83b2a0fae5e2
1d42f0abe74aec8e8b543233a28ef5bf732d8854

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Breakpoints not found when in a folder that contains ".zipx"

2 participants