microsoft / microsoft/vscode-python-debugger

Incorrect debugpy command selected in terminal

オープン
#931 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

feature-request
主要言語
TypeScript
スター
181
フォーク
126
平均マージ
2日 3時間
マージ済み PR(30日)
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. リポジトリをフォークし、ブランチを切って変更します。
  4. 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 を短くまとめたダイジェスト。