microsoft / microsoft/vscode-python-debugger
Conda environment initialized differently when executing vs debugging unit tests
@eleanorjboyd đang làm issue này rồi.
Từ ngày 30/6/2025.
- Ngôn ngữ chính
- TypeScript
- Star
- 181
- Fork
- 126
- Merge trung bình
- 2 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 3
Mô tả
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 underetc/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.dseem 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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.