Skip to content

debugpy: Fetch a wheel into Zed's work dir and use that with users venv#35640

Merged
osiewicz merged 4 commits intomainfrom
debugpy-fetch-wheel
Aug 5, 2025
Merged

debugpy: Fetch a wheel into Zed's work dir and use that with users venv#35640
osiewicz merged 4 commits intomainfrom
debugpy-fetch-wheel

Conversation

@osiewicz
Copy link
Copy Markdown
Member

@osiewicz osiewicz commented Aug 5, 2025

Another stab at #35388
cc @Sansui233

Closes #35388

Release Notes:

  • debugger: Fixed Python debug sessions failing to launch due to a missing debugpy installation.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Aug 5, 2025
@Sansui233
Copy link
Copy Markdown

Thanks for keeping at it—it’s working!

Though there is windows platform related issue that

0.87s - Expected: C:\Users\lingn\AppData\Local\Zed\debug_adapters\Debugpy\debugpy\_vendored\pydevd\pydevd_attach_to_process\attach.dll to exist.

Because it's called attach_amd64.dll and attach_x86.dll on Windows with amd's architecture. I'm not sure if there would be attach_arm64 or so...the name is a little bit annoying 😅 Now I just hard link it to attach.dll manually……

@osiewicz
Copy link
Copy Markdown
Member Author

osiewicz commented Aug 5, 2025

No, thank you for the continuous feedback of high quality. :)

I don't have a Windows box (I can fetch the windows wheels just fine though). I wonder how VSC's extension handles that on Windows though 🤔

This is the code that sets the expected name to "attach.dll": https://github.com/microsoft/debugpy/blob/1aff9aa541955b967f41895570d4c0b54a7504d9/src/debugpy/_vendored/pydevd/pydevd_tracing.py#L254

@Sansui233
Copy link
Copy Markdown

In their bundled plugin, they use debugpy-1.8.13, which does not reset the suffix
https://github.com/microsoft/debugpy/blob/v1.8.13/src/debugpy/_vendored/pydevd/pydevd_tracing.py#L254

@osiewicz
Copy link
Copy Markdown
Member Author

osiewicz commented Aug 5, 2025

It seems like this was ~broken by microsoft/debugpy#1917. In such case, are you okay with me merging this PR as-is and then following up by fixing that upstream in debugpy itself?

@Sansui233
Copy link
Copy Markdown

Sansui233 commented Aug 5, 2025

Ok fine😂 There's not much that can be done for that. Thank you. VS Code releases its DAP through a plugin, whereas Zed bundles it directly. You really do a great job.

@osiewicz
Copy link
Copy Markdown
Member Author

osiewicz commented Aug 5, 2025

Yeah, we'll just need them to bump the debugpy version - we don't need to wait for a new plugin version

osiewicz added a commit to osiewicz/debugpy that referenced this pull request Aug 5, 2025
Follow-up to microsoft#1917, which changed the prefix for Windows. The crux of that contribution was about enabling attaching on Sillicon Mac (in fact, it came from my colleagues at Zed Industries). This however broke .dll lookup per zed-industries/zed#35640 (comment)
@osiewicz osiewicz merged commit fc2ba82 into main Aug 5, 2025
23 checks passed
@osiewicz osiewicz deleted the debugpy-fetch-wheel branch August 5, 2025 17:09
@osiewicz
Copy link
Copy Markdown
Member Author

osiewicz commented Aug 5, 2025

@Sansui233 just to confirm - which Python version are you using? Apparently it's only broken in 3.11 and below (per linked PR).

rchiodo pushed a commit to microsoft/debugpy that referenced this pull request Aug 5, 2025
Follow-up to #1917, which changed the prefix for Windows. The crux of that contribution was about enabling attaching on Sillicon Mac (in fact, it came from my colleagues at Zed Industries). This however broke .dll lookup per zed-industries/zed#35640 (comment)
Ces-D pushed a commit to Ces-D/zed that referenced this pull request Aug 5, 2025
…nv (zed-industries#35640)

Another stab at zed-industries#35388
cc @Sansui233

Closes zed-industries#35388

Release Notes:

- debugger: Fixed Python debug sessions failing to launch due to a
missing debugpy installation.
orual pushed a commit to orual/zed that referenced this pull request Aug 23, 2025
…nv (zed-industries#35640)

Another stab at zed-industries#35388
cc @Sansui233

Closes zed-industries#35388

Release Notes:

- debugger: Fixed Python debug sessions failing to launch due to a
missing debugpy installation.
rchiodo added a commit to microsoft/debugpy that referenced this pull request Dec 1, 2025
* pydevd: Fix up prefix of attach shared library for Windows (#1939)

Follow-up to #1917, which changed the prefix for Windows. The crux of that contribution was about enabling attaching on Sillicon Mac (in fact, it came from my colleagues at Zed Industries). This however broke .dll lookup per zed-industries/zed#35640 (comment)

* Check if `os.__file__` is available before using it (#1944)

* check if os.file is available before using it

* use threading.__file__ als last fallback

* update testing for python 3.14 (#1955)

* update testing for python 3.14

* Allow python 3.14 in attach code

* move 3.14 to its own job outside of matrix

* try 3.14.0-rc.2

* allowUnstable

* use 3.14.0-rc.2 but use 3.14 in tests

* include py.typed in the distributed package (#1960)

* Add gcc flags (#1947)

* Add pyrx-admins as code owners (#1976)

* Add pyrx-admins as code owners

* Combine CODEOWNERS entries into a single line

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: timrid <6593626+timrid@users.noreply.github.com>
Co-authored-by: Bill Schnurr <bschnurr@hotmail.com>
Co-authored-by: lev-blit <47675736+lev-blit@users.noreply.github.com>
Co-authored-by: Karthik Nadig <kanadig@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Debugger: Python test debug doesn't start

2 participants