microsoft / microsoft/vscode-python-debugger
Incorrect debugpy command selected in terminal
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 181
- 派生
- 126
- 平均合并
- 2 天 3 小时
- 30 天内合并 PR
- 3
描述
Before creating a new issue, please check the FAQ to see if your question is answered there.
Notes
We have debugpy python package installed locally and running debugpy in the VSCode terminal selects the local installation instead of the bundled extension wrapper in .vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/scripts/noConfigScripts/debugpy. This broke since debugpy 1.8.5, which added the debugpy script to the python package. This happens because the extension wrapper path is added to the end of PATH rather than beginning. Can the extension be modified to prepend the bundled path to the front of PATH instead?
Environment data
- debugpy version: 1.8.16 (run
import debugpy; print(debugpy.__version__)if uncertain) - OS and version: Red Hat Enterprise Linux 8.10 (Ootpa)
- Python version (& distribution if applicable, e.g. Anaconda): 3.11.13
- Using VS Code or Visual Studio: Yes
Actual behavior
In VSCode terminal when we run debugpy <python-filename>. Instead of attaching a debugger, it gives us the help menu.
Expected behavior
Running debugpy <filename> should select the debugy version bundled with the ms-python.debugpy extension and attach the debugger.
Steps to reproduce:
- Install Debugpy version
1.8.16on the system using pip. - Open the project in VSCode
- Download the Python Debugger Extension (@id:ms-python.debugpy) V2025.18.0
- Try debugging a python file by running
debugpy <filename>in VSCode Terminal.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先跟踪将捆绑路径 .vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/scripts/noConfigScripts/debugpy 添加到 VS Code 终端 PATH 的扩展代码。使用 debugpy 1.8.16 重现该问题,并确认将此路径置于最前面后,debugpy <filename> 会附加调试器,而不是显示帮助菜单。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python, typescript, vscode
- 领域
- cli, devtools
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100