EnvFile icon indicating copy to clipboard operation
EnvFile copied to clipboard

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

Open songololo opened this issue 4 years ago • 5 comments

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

songololo avatar Feb 10 '21 12:02 songololo

I have the same issue.

BenSmith avatar Feb 18 '21 04:02 BenSmith

Same issue.

pastorhudson avatar Mar 19 '21 14:03 pastorhudson

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

nrontsis avatar Mar 22 '21 13:03 nrontsis

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.

helloworldless avatar Mar 21 '22 17:03 helloworldless

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.

Nielius avatar Oct 05 '23 10:10 Nielius