microsoft / microsoft/vscode-python-debugger
Incorrect debugpy command selected in terminal
Personne n'a encore pris cette issue.
- Langage dominant
- TypeScript
- Étoiles
- 181
- Forks
- 126
- Merge moyen
- 2 j 3 h
- PR mergées (30 j)
- 3
Description
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.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par suivre le code de l’extension qui ajoute le chemin fourni .vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/scripts/noConfigScripts/debugpy au PATH du terminal VS Code. Reproduisez le problème avec debugpy 1.8.16 et vérifiez que le fait de placer ce chemin en tête permet à debugpy <filename> d’attacher le débogueur au lieu d’afficher le menu d’aide.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python, typescript, vscode
- Domaine
- cli, devtools
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100