You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have you been able to solve this issue? It's getting on my nerves. I've been trying to sort this out for hours. Visual Studio Code is NOT detecting my .env file no matter how hard I try. Already put "python.envFile": "${workspaceFolder}/.env" in local and global settings.json, reloaded a bunch of times, but no matter what nothing appears to be taking that setting into account.
Thanks!
The text was updated successfully, but these errors were encountered:
So after several hours, from these links I got the big hint:
IN VISUAL STUDIO CODE, UNLIKE PYCHARM (FROM WHERE THIS FUNCTIONALITY WAS RIPPED OFF) THE .env FILE ONLY, ONLY, ONLY IS TAKEN INTO ACCOUNT WHEN RUNNING CODE FROM THE DEBUGGER.
When hitting "play", that's ran from the terminal, so that value is not used.
Microsoft or whoever maintains the Python extension for VS Code has to be more clear about that. Now that I give all these articles a second read, I can tell that people are complaining that this only works from the debugger.
On Pycharm it's just better resolved and there's no ambiguity on how that file is parsed.
Have you been able to solve this issue? It's getting on my nerves. I've been trying to sort this out for hours. Visual Studio Code is NOT detecting my .env file no matter how hard I try. Already put "python.envFile": "${workspaceFolder}/.env" in local and global settings.json, reloaded a bunch of times, but no matter what nothing appears to be taking that setting into account.
Thanks!
The text was updated successfully, but these errors were encountered: