Cannot set remote breakpoints in Visual Studio Community 2022 (Version 17.9.3)
还没有人认领这个 Issue。
评估
调研方向
从 debugpy/_vendored/pydevd/pydevd_file_utils.py 开始,尤其检查 set_ide_os(os),并将随附的 adapter、pydevd 和 server 日志与报告中的路径转换步骤进行比较。使用列出的环境复现从 Windows 到 Ubuntu 的远程附加,并检查转换后路径周围的斜杠转换。完成标准是:连接前设置的断点和连接后设置的断点都解析到 /home/shamada/debug/b.py,而不是报告文件不存在。
由索引模型根据 Issue 内容生成。
描述
Symptoms
Remote debugging using VS2022+debugpy does not work properly.
The remote connection is successful, but Breakpoint cannot be set.
Environmental Data
Client environment
- Windows-10
- Visual Studio Community 2022 (ver 17.9.3)
- debugpy 1.8.0
- workdir: \10.123.36.238\shamada\debug\
Server environment
- Ubuntu-22.0.4
- Python 3.11.5
- debugpy 1.8.0
- workdir: /home/shamada/debug/
Execution steps and results
Execution steps
[server side]
export DEBUGPY_LOG_DIR="/home/shamada/debug"
export DEBUG_PYDEVD_PATHS_TRANSLATION=1
export PATHS_FROM_ECLIPSE_TO_PYTHON='[["\\\\10.123.36.238\\shamada\\", "/home/shamada/"]]'
conda activate py311a
python -Xfrozen_modules=off -m debugpy --wait-for-client --listen 0.0.0.0:5678 b.py
[cliennt side]
execute "attach to process"
execute "python remote (debugpy)"
Results
Pre-set breakpoints will be disabled.
Breakpoints set after connection are also disabled.
Both breakpoints are given the error message "Breakpoint in file that does not exist."
Investigation
debugpy.pydevd.log contains logs like the following.
0.00s - Request for breakpoint in: \\10.123.36.238\shamada\debug\b.py line: 3
0.00s - pydev debugger: replacing to server: \\10.123.36.238\shamada\debug\b.py
0.00s - pydev debugger: sent to server: /home/shamada/debug\b.py - matched prefix: \\10.123.36.238\shamada\
0.00s - Breakpoint (after path translation) in: /home/shamada/debug\b.py line: 3
0.00s - os.path.exists('/home/shamada/debug\\b.py') returned False.
It seems that the cause is that slashes and backslashes are not converted properly in path mapping.
Please see the attached file for all logs.
debugpy.adapter-4104855.log
debugpy.pydevd.4104847.log
debugpy.server-4104847.log
Additional attempts
Referring to the previous issue below, I modified the system file below on both the client and server.
Cannot set remote breakpoints in Visual Studio Community 2019 (Version 16.6.1)
File: debugpy/_vendored/pydevd/pydevd_file_utils.py
Location: in set_ide_os(os) function
Add the following.
os = 'WINDOWS'
The symptoms did not change.
- 主要语言
- Python
- 星标
- 2.5k
- 派生
- 202
- 平均合并
- 5 天 1 小时
- 30 天内合并 PR
- 1
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/debugpy 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
documentation
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 78/100
-
documentation
难度 2/5 1-3 小时 新手友好度 62/100
-
难度 3/5 1-2 天 新手友好度 68/100
查看 microsoft/debugpy 的全部 Issue
相似的 Issue
-
area: harness bug status: needs-triage
难度 2/5 1-3 小时 新手友好度 75/100
Human-Agent-Society/reef#625 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 1/5 1 小时以内 新手友好度 80/100
learningequality/kolibri#15351 · 2 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
Name consistency 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
eellak/triplestore#65 · 1 条评论 ·