Skip to content
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

Debug terminal does not activate environment despite settings #22931

Closed
irm-codebase opened this issue Feb 19, 2024 · 10 comments
Closed

Debug terminal does not activate environment despite settings #22931

irm-codebase opened this issue Feb 19, 2024 · 10 comments
Assignees
Labels
triage-needed Needs assignment to the proper sub-team

Comments

@irm-codebase
Copy link

Type: Bug

Behaviour

Expected vs. Actual

The selected virtual environment should be used when running the debugger by default.

Actual: the base environment is used, ignoring any settings.

Steps to reproduce:

  1. Install conda/mamba/miniforge on Linux.
  2. Create and set a random environment on VSCode.
  3. Run a script: the configured environment will be used
    image
  4. Debug the same script: base environment will be used.
    image

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.12.2
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Conda
  • Value of the python.languageServer setting: Default
Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

User Settings


languageServer: "Pylance"

Extension version: 2024.0.1
VS Code version: Code 1.86.2 (903b1e9d8990623e3d7da1df3d33db3e42d80eda, 2024-02-13T19:41:37.860Z)
OS version: Linux x64 6.7.4-200.fc39.x86_64
Modes:

System Info
Item Value
CPUs 13th Gen Intel(R) Core(TM) i7-13700H (20 x 1154)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) 2, 1, 1
Memory (System) 15.25GB (7.51GB free)
Process Argv --unity-launch --crash-reporter-id 1bcba3d5-9805-45ca-9f01-20f5eeb14cbc
Screen Reader no
VM 0%
DESKTOP_SESSION gnome
XDG_CURRENT_DESKTOP GNOME
XDG_SESSION_DESKTOP gnome
XDG_SESSION_TYPE wayland
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscorecescf:30445987
vscod805:30301674
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:30899288
vscaat:30438848
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialogc:30910334
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
edj9j583:30958191
fegfb526:30961430
7j2b6412:30967274
bg6jg535:30958357

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Feb 19, 2024
@bigalnz
Copy link

bigalnz commented Feb 20, 2024

Same issue here on Windows 10 but I am not in debug enviro.

@rrorato
Copy link

rrorato commented Feb 20, 2024

Same here with python 3.8.1. It is being selected as the preferred environment (and automatically activated when opening new terminal window) but doesn't get selected on debug startup.

@karrtikr
Copy link

Debug the same script: base environment will be used.

Can you clarify what you mean by the "base" environment here?

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Feb 20, 2024
@karrtikr
Copy link

karrtikr commented Feb 20, 2024

Closing as duplicate of microsoft/vscode#204694.

@karrtikr karrtikr closed this as not planned Won't fix, can't repro, duplicate, stale Feb 20, 2024
@karrtikr
Copy link

Try the pre-release version of the extension which may help meanwhile:

image

@bigalnz
Copy link

bigalnz commented Feb 20, 2024 via email

@cmcnicoll
Copy link

Try py --list.

@irm-codebase
Copy link
Author

Debug the same script: base environment will be used.

Can you clarify what you mean by the "base" environment here?

I meant the base conda environment. If you run python on the terminal without activating any environments, it'll go to the base conda environment (assuming you have conda activated by default).

Second to last on the conda range:
image

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Feb 21, 2024
@irm-codebase
Copy link
Author

Try the pre-release version of the extension which may help meanwhile:

image

Switched today. This is still botched, unfortunately.
Terminal should say "calliope-pathways-dev (c)", which uses python 3.12. Base environment has 3.10:
image

@karrtikr
Copy link

This should be fixed with microsoft/vscode#204694.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

5 participants