-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Debug test does not load env variables from conda #20680
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
Comments
Thanks for the bug report! We just wanted to quickly acknowledge we received it and we will triage this as soon as we can. |
Try adding the following configuration to your
This makes sure we use integrated terminal instead of internal console when debugging tests, where the environment variables are already loaded. |
#8422 should help fix the error when using internal console. |
@karrtikr thanks for suggesting a workaround! |
@eleanorjboyd @karthiknadig Is there any particular reason why we prefer to use |
deferring to @karthiknadig for this answer |
Tests are often run in the background. So, we use |
I see, given there's nothing to change, closing this issue in favor of #8422. Feel free to upvote that to raise priority. |
Type: Bug
Behaviour
Expected vs. Actual
Expected: if I set the python interpreter for a workspace as a conda env built from an
environment.yml
file that specifies some environment variables through thevariables
keyword, I would like to have those variables set when I run code through the Python debugger VSCode extension.Actual: the env variables are not set when running code from the VSCode debugger.
Note that I experienced the error while debugging tests using pytest.
Steps to reproduce:
variables
keyword specifying some env varsDiagnostic data
python.languageServer
setting: DefaultUser Settings
Extension version: 2023.2.0
VS Code version: Code 1.75.1 (441438abd1ac652551dbe4d408dfcec8a499b8bf, 2023-02-08T21:32:34.589Z)
OS version: Windows_NT x64 10.0.22621
Modes:
Sandboxed: No
Remote OS version: Linux x64 5.15.0-1028-aws
System Info
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_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: