microsoft / microsoft/vscode-python-debugger

Incorrect debugpy command selected in terminal

未關閉
#931 4 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

feature-request
主要語言
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:

  1. Install Debugpy version 1.8.16 on the system using pip.
  2. Open the project in VSCode
  3. Download the Python Debugger Extension (@id:ms-python.debugpy) V2025.18.0
  4. Try debugging a python file by running debugpy <filename> in VSCode Terminal.

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 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

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。