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

remoteEnv variable DEBUG is lost when running pytest #9657

Open
rvanlaar opened this issue Mar 14, 2024 · 1 comment
Open

remoteEnv variable DEBUG is lost when running pytest #9657

rvanlaar opened this issue Mar 14, 2024 · 1 comment
Assignees
Labels
containers Issue in vscode-remote containers

Comments

@rvanlaar
Copy link

rvanlaar commented Mar 14, 2024

I have a python project with a .devcontainer. When I open this python project with "Clone repository in container volume" the project gets build.

In the "remoteEnv" of the devcontainer.json I have configured a couple of environment variables. One of which is "DEBUG".

The problem is that when I try to execute tests via the test runner, the environment variable DEBUG isn't defined. Resulting in a failed test run.

When I run the tests via the integrated terminal the tests pass, because the enviroment variable is available.

This is the remoteEnv:

	"remoteEnv": {
		"DEBUF": "DEBUF",
		"DEBUG": "DEBUG",
		"DEBUH": "DEBUH"
	},

And the following is part of the output, generated by: python ~/.vscode-server/extensions/ms-python.python-2024.2.1/pythonFiles/printEnvVariables.py

..."REMOTE_CONTAINERS":"true","DEBUF":"DEBUF","DEBUH":"DEBUH","BROWSER":"/vs...

Notice that the other DEBUF and DEBUH variables are available but the variable DEBUG is missing.

Please let me know when more information is required.

@VSCodeTriageBot VSCodeTriageBot added the containers Issue in vscode-remote containers label Mar 14, 2024
@rvanlaar
Copy link
Author

Note: Our application checks for a .env file. As a temporary work around I've added RUN echo "DEBUG=true" > /.env to our Docker File.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
containers Issue in vscode-remote containers
Projects
None yet
Development

No branches or pull requests

3 participants