microsoft / microsoft/vscode-python-debugger
Incorrect debugpy command selected in terminal
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- TypeScript
- Estrelas
- 181
- Forks
- 126
- Merge médio
- 2d 3h
- PRs com merge (30d)
- 3
Descrição
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.
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece rastreando o código da extensão que adiciona o caminho incluído .vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/scripts/noConfigScripts/debugpy ao PATH do terminal do VS Code. Reproduza o problema com debugpy 1.8.16 e verifique se preceder este caminho faz com que debugpy <filename> anexe o depurador em vez de exibir o menu de ajuda.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- python, typescript, vscode
- Domínio
- cli, devtools
- Tipo de issue
- Bug
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 45/100