microsoft / microsoft/vscode-python-debugger

Incorrect debugpy command selected in terminal

Offen
#931 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

feature-request
Vorherrschende Sprache
TypeScript
Sterne
181
Forks
126
Ø Merge
2 T. 3 Std.
Gemergte PRs (30 T.)
3

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, den Erweiterungscode nachzuverfolgen, der den gebündelten Pfad .vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/scripts/noConfigScripts/debugpy zum PATH des VS Code-Terminals hinzufügt. Reproduziere das Problem mit debugpy 1.8.16 und überprüfe, dass das Voranstellen dieses Pfads bewirkt, dass debugpy <filename> den Debugger anhängt, anstatt das Hilfemenü anzuzeigen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python, typescript, vscode
Bereich
cli, devtools
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.