Source lookup fails for paths with “.zip_\” segment
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 74/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- python, vscode
调研方向
使用 C:\repro\archive.zip_\files\app\script.py 和 .vscode/launch.json 配置,通过 debugpy.connect() 和 debugpy.breakpoint() 重现该失败。首先跟踪 Windows 上针对 .zip_ 段的源查找和路径映射处理。完成的标准是:字面路径能在 VS Code 中打开,断点能够绑定,单步执行不再回退到顶层 exec frame。
由索引模型根据 Issue 内容生成。
描述
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\ -
Create C:\repro\archive.zip_\files\app\script.py with:
import debugpy
debugpy.connect(("127.0.0.1", 9092))
debugpy.breakpoint()
print(file)
In VS Code, open C:\repro\archive.zip_\files\app\ as the workspace and add .vscode/launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen 9092",
"type": "python",
"request": "attach",
"listen": { "host": "127.0.0.1", "port": 9092 },
"pathMappings": [
{
"remoteRoot": "C:\repro\archive.zip_\files\app",
"localRoot": "C:\repro\archive.zip_\files\app"
}
],
"justMyCode": true
}
]
}
- Start the Listen 9092 configuration in VS Code.
- In a separate console, run: python C:\repro\archive.zip_\files\app\script.py
- BOOM
- 主要语言
- Python
- 星标
- 2.5k
- 派生
- 205
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 3
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/debugpy 的其他 Issue
-
pydevd_comm.py start_client() does not set TCP_NODELAY on the connections it opens可能已有人在做 @nightcityblade 于 49 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
-
Document "rules"-option可能已有人在做 @nightcityblade 于 37 天前认领。 未关闭documentation
难度 2/5 1-3 小时 新手友好度 68/100
-
wx.EventLoop() deprecation warning可能已有人在做 @nightcityblade 于 36 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
-
debugpy.configure(python=) is not properly documented可能已有人在做 @nightcityblade 于 47 天前认领。 未关闭documentation
难度 2/5 1-3 小时 新手友好度 62/100
-
Adapter bootstrap fails with ConnectionRefusedError on WSL2 VirtioProxy or hostAddressLoopback可能已有人在做 @nightcityblade 于 3 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 68/100
查看 microsoft/debugpy 的全部 Issue
相似的 Issue
-
namespace operations
难度 1/5 1 小时以内 新手友好度 72/100
EclipseFdn/open-vsx.org#13737 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
zhuima/awesome-cloudflare#237 ·
-
Zero-token evaluations are treated as missing cost in selection可能已有人在做 @sylvesterkaczmarek 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
google-research/rrsi#6 ·
-
bug
难度 2/5 1-3 小时 新手友好度 88/100
aws-samples/sample-aws-genai-db-modernizer#294 ·
维护者通常 1 天内回复
-
feedback simulation workshop
难度 2/5 1-3 小时 新手友好度 84/100
githubnext/gh-aw-workshop#4174 ·
维护者通常 1 天内回复