Skip to content

Debugging leaves terminal in conda's Base environment instead of selected (interpreter's) conda environment #25023

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
zljubisic opened this issue Apr 29, 2025 · 4 comments
Assignees
Labels
feature-request Request for new features or functionality triage-needed Needs assignment to the proper sub-team

Comments

@zljubisic
Copy link

Steps to Reproduce:

  1. I am debugging my (pytest) test using Testing > select test > Debug Test GUI.
  2. Test is executing
  3. After test finishes it leaves terminal in Base conda environment instead of selected (interpreter's) environment.

As I end up in base environment, sometimes I execute poetry install which installs current project's dependencies in base environment. Sometimes I run pytest in base environment but it is not installed there and so on.

After interpreter is selected, whatever we do, we should do it inside that selected environment.
Any terminal windows that are opening during any process should use selected environment.
We should never end up in terminal in Base conda's environment.

VS Code Version:
Version: 1.99.3 (user setup)
Commit: microsoft/vscode@17baf84
Date: 2025-04-15T23:18:46.076Z
Electron: 34.3.2
ElectronBuildId: 11161073
Chromium: 132.0.6834.210
Node.js: 20.18.3
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.19045, connected to remote Ubuntu

@zljubisic zljubisic added the feature-request Request for new features or functionality label Apr 29, 2025
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Apr 29, 2025
@karthiknadig
Copy link
Member

@zljubisic Can you try with the https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-python-envs extension? You may need to set python.condaPath to conda with it. That is temporary.

That is a experimental extension that will eventually replace environment management and handling, it should do a bit better than this extension.

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Apr 30, 2025
@zljubisic
Copy link
Author

Currently, I can't afford using experimental extension at work.
Until this problem is solved I have to execute exit in terminal whenever I want to do something in project's environment.
Really annoying.

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Apr 30, 2025
@karthiknadig karthiknadig self-assigned this Apr 30, 2025
@zljubisic
Copy link
Author

I believe that we can conclude here that whatever we do within our project should be done in selected environment.

@mumiao2000
Copy link

mumiao2000 commented May 11, 2025

@zljubisic Can you try with the https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-python-envs extension? You may need to set python.condaPath to conda with it. That is temporary.

That is a experimental extension that will eventually replace environment management and handling, it should do a bit better than this extension.

No help with experimental or historical extension. It seems due to VSCode 1.100.0 version.

Everything goes well except the terminal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

3 participants