You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Source lookup fails for paths with “.zip_\” segment #1964
Before creating a new issue, please check the FAQ to see if your question is answered there.
Environment data
debugpy version: 1.8.15
OS and version: XXX: Microsoft Windows 11 Enterprise , 10.0.22631 N/A Build 22631
Python version : Python 3.8.9
Using VS Code or Visual Studio: VS Code
Actual behavior
When attaching from VS Code (debugger in listen mode) to a target process that calls debugpy.connect(...), if the script’s path contains a directory segment like ...\archive.zip_\files... (this is a normal folder, not an archive), VS Code shows:
Unable to retrieve source for C:\repro\archive.zip_\files\app\script.py
Note the path is displayed as zip_\files, whereas the actual on-disk path is zip_\files. Because of this mismatch, the source cannot be opened, breakpoints remain unresolved, and stepping falls back to a top-level exec frame.
Renaming the folder so it does not contain .zip_ makes the problem disappear.
Expected behavior
The debugger should treat the file system path literally and open the source without rewriting segments around .zip. Breakpoints should bind and stepping should work normally for any valid Windows path.
Steps to reproduce:
Create the following directory structure:
C:\repro\archive.zip_\files\app\
I traced this to pydevd_file_utils.py in the vendored PyDev.Debugger subrepo. Debugpy's contribution guide requires changes there to be submitted upstream to PyDev.Debugger and then synchronized through the subrepo workflow, so this is not the small single-repository fix I expected. I'm releasing my claim rather than submitting an incomplete downstream-only patch. Sorry for the delay.
Activity
nightcityblade commentedon Aug 16, 2026
Hi, I'd like to work on this. I'll submit a PR shortly.
nightcityblade commentedon Aug 21, 2026
I traced this to
pydevd_file_utils.pyin the vendored PyDev.Debugger subrepo. Debugpy's contribution guide requires changes there to be submitted upstream to PyDev.Debugger and then synchronized through the subrepo workflow, so this is not the small single-repository fix I expected. I'm releasing my claim rather than submitting an incomplete downstream-only patch. Sorry for the delay.