ashald / EnvFile

EnvFile 3.x is a plugin for JetBrains IDEs that allows you to set environment variables for your run configurations from one or multiple files.
MIT License
539 stars 129 forks source link

Works when running configuration in debug mode, but doesn't work in run mode? #129

Open songololo opened 3 years ago

songololo commented 3 years ago

In my case the plugin works when running a configuration in debug mode, but doesn't work in run mode.

Is there a configuration issue on my end or is this possibly a bug?

Pycharm version 2020.3

BenSmith commented 3 years ago

I have the same issue.

pastorhudson commented 3 years ago

Same issue.

nrontsis commented 3 years ago

As a temporary workaround, I am using the following option: Screenshot 2021-03-22 at 13 06 51 in the run configuration.

helloworldless commented 2 years ago

I think there is an underlying issue with PyCharm here.

I noticed that, when running tests, it does not pick up the environment variables from the Run Configuration Environment if I use Run. However, it does pick them up if I use Debug.

Nielius commented 11 months ago

I'm encountering the same issue with PyCharm 2023.1.3 (CE), but not always: when I run (not debug) a run configuration with module name uvicorn (rather than e.g. running a script path), the environment variables are not picked up. If I debug the same run configuration, the environment variables are picked up.

@nrontsis 's workaround (using "Emulate terminal in output console") also works in this case.