Debug configuration does not override workspace python interpreter
@eleanorjboyd já está trabalhando nisso.
Desde 30/9/2024.
Avaliação
Esta issue ainda não foi avaliada.
Descrição
Fairly straightforward issue. When performing "Start Debugging" or "Run Without Debugging", the debugger will use the current workspace interpreter instead of the interpreter specified in the launch.json configuration with the "python" key.
Steps to reproduce:
- Have a multi-folder/root workspace. E.g.:
- .vscode
- launch.json
- ProjectA
- projecta-abcd-py3.x
- etc
- ProjectB
- projectb-abcd-py3.x
- etc
- .vscode
- Specify the interpreter you want each debug configuration to use in your launch.json file. E.g.:
{
"version": "0.2.0",
"configurations": [
{
"name": "ProjectA",
"type": "debugpy",
"python": "${workspaceFolder}/projectA/projecta-abcd-py3.x/bin/python",
"request": "launch",
"program": "${workspaceFolder}/projectA/cli.py",
"console": "integratedTerminal",
"args": []
},
{
"name": "ProjectB",
"type": "debugpy",
"python": "${workspaceFolder}/ProjectB/projectb-abcd-py3.x/bin/python",
"request": "launch",
"program": "${workspaceFolder}/ProjectB/cli.py",
"console": "integratedTerminal",
"args": []
},
]
}
- Set your workspace interpreter to the interpreter for any project. Let's say we set it to A,
./projectA/projecta-abcd-py3.x/bin/python. - Select the run & debug configuration for a different project. Let's say we select B.
- Start Debugging or Run Without Debugging.
Expected result (terminal output):
source /home/REDACTED/ProjectB/projectb-abcd-py3.x/bin/activate
user@host:~/REDACTED$ source /home/REDACTED/ProjectB/projectb-abcd-py3.x/bin/activate
(projectb-py3.x) user@host:~/REDACTED$ /usr/bin/env /home/REDACTED/ProjectB/projectb-abcd-py3.x/bin/python /home/REDACTED/.vscode-server/extensions/ms-python.debugpy-2024.10.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher 41261 -- /home/REDACTED/ProjectB/cli.py
Actual result (terminal output):
source /home/REDACTED/ProjectA/projecta-abcd-py3.x/bin/activate
user@host:~/REDACTED$ source /home/REDACTED/ProjectA/projecta-abcd-py3.x/bin/activate
(projecta-py3.x) user@host:~/REDACTED$ /usr/bin/env /home/REDACTED/ProjectA/projecta-abcd-py3.x/bin/python /home/REDACTED/.vscode-server/extensions/ms-python.debugpy-2024.10.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher 41261 -- /home/REDACTED/ProjectB/cli.py
- Linguagem predominante
- TypeScript
- Estrelas
- 181
- Forks
- 126
- Merge médio
- 2d 3h
- PRs com merge (30d)
- 3
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.
Mais de microsoft/vscode-python-debugger
-
triage-needed
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
microsoft/vscode-python-debugger#1110 ·
-
triage-needed
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 88/100
microsoft/vscode-python-debugger#1024 · 1 comentário ·
-
triage-needed
microsoft/vscode-python-debugger#1111 · 1 reação · 1 responsável ·
-
triage-needed
microsoft/vscode-python-debugger#1106 · 1 reação · 2 responsáveis ·
-
triage-needed
microsoft/vscode-python-debugger#1104 · 1 reação · 1 responsável ·
Todas as issues de microsoft/vscode-python-debugger
Issues semelhantes
-
Type/Bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
OpenNSW/nsw-srilanka#497 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
0xMiden/bridge-portal#132 ·
-
react-doctor severity:warning tech-debt
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
digidem/comapeo-cloud-app#403 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100