Skip to content

Feature request: envFile support in launch.json #172

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

Open
aguynamedben opened this issue Dec 11, 2024 · 0 comments
Open

Feature request: envFile support in launch.json #172

aguynamedben opened this issue Dec 11, 2024 · 0 comments

Comments

@aguynamedben
Copy link

aguynamedben commented Dec 11, 2024

This is a feature request. The Python debug adapter for VS Code supports an envFile property and it would be very handy if this adapter did as well. When switching between VS Code and nvim-dap, this was a rough edge that took me hours to figure out. There are also security benefits with the convention of storing project-level environment variable in .env files.

From VS Code launch.json docs:

Many debuggers support some of the following attributes:
...
env - environment variables (the value null can be used to "undefine" a variable)
envFile - path to dotenv file with environment variables
...

I've read the discussion about adding envFile to nvim-dap (upstream) and really think it could be added there, as environment variables apply across many languages (i.e. maybe VS Code has it wrong!).

I realize I can hack up some Lua to get it working, but this just seems like something that should be built-in to nvim-dap-python, or even nvim-dap, and should "just work".

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

No branches or pull requests

1 participant