-
Notifications
You must be signed in to change notification settings - Fork 26
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
launch envFile cannot use the variable ${fileDirname} #522
Comments
Hi @snr278, Thank you for reporting this issue! Seems like we don't interpolate Notes
|
I just came across this bug today. I thought it was just me! |
@kimadeline above you said
Please note that it is dangerous to interpolate variables yourself because you will miss newly introduced variables (and your variable substitution code might differ from VS Code's code). A fully interpolated launch config is passed into the |
Thank you for the heads-up @weinand! We indeed use @mattgillard feel free to upvote the issue report to help us prioritize this. Thanks! |
This seems to work sometimes for me and other times it does not. Any ideas? |
Is this still a problem people are facing? |
Environment data
"python.jediEnabled"
set to; more info How to update the language server to the latest stable version vscode-python#3977): Jedipython.languageServer
setting: MicrosoftExpected behaviour
configurations.envFile can use the variable ${fileDirname} (eg:"envFile": "${fileDirname}/${fileBasenameNoExtension}.env")
Actual behaviour
env variables define in file ${fileDirname}/${fileBasenameNoExtension}.env are not working.
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
2.test.env define the env variable TEST_ENV_MY=hello world test_env
3.test.py print the env variable TEST_ENV_MY
4.define the envFile in launch.json "envFile": "${fileDirname}/.env"
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
; turn on source maps to make any tracebacks be useful by runningEnable source map support for extension debugging
)The text was updated successfully, but these errors were encountered: