Skip to content

Feature request: envFile support in launch.json #172

Open
@aguynamedben

Description

@aguynamedben

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions