microsoft / microsoft/vscode-python-debugger

Conda environment initialized differently when executing vs debugging unit tests

Aberta
#736 3 comentários 0 reações 1 responsável Ver no GitHub

@eleanorjboyd já está trabalhando nisso.

Desde 30/6/2025.

triage-needed
Linguagem predominante
TypeScript
Estrelas
180
Forks
126
Merge médio
2d 3h
PRs com merge (30d)
3

Descrição

I have to develop my code on a custom python stack that doesn't fully conform to anaconda; many packages are initialized by adding them to PYTHONPATH with a command-line tool. I automated this by creating an activation script that went under etc/conda/activate.d. I also have a .env in the workspace root that sets the same PYTHONPATH. I works but I found the following issue:

  • When a unit test is started without debugging the procedure of running it is: 1) source .env 2) execute conda run ... which will result in sourcing the custom activation scripts under etc/conda/activate.d.
  • When a unit test is started in the debugger, the procedure differs: 1) source .env 2) execute some auto-generated script that will call the debugpy module. The custom activation scripts under etc/conda/activate.d seem not be sourced.

This can be an issue for some. The behavior should be that the conda environment is activated the same way while debugging and just executing unit tests.

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.