yriveiro / dap-go.nvim

nvim-dap extension to make simpler debug Golang using Delve
MIT License
11 stars 4 forks source link

Feature request: "envFile" attribute #7

Open niklod opened 2 years ago

niklod commented 2 years ago

Feature request

Implement envFile attribute in launch.json dap configuration.

Possible profits

A more convenient way to manage dotenvs while debugging complex projects.

Description

According to VSCode debugger config there is a very useful attribute envFile that helps manage big Dotenv files while debugging complex projects. Without this attribute, there is only one way to use .env files – env attribute. Now it works properly, but after editing variables, we should constantly reload nvim-dap. A workflow like this is painful in my opinion.

Possible solutions

It would be possible to support envFile in a nvim-dap extension by using the enrich_config hook supported for adapters. See :h dap-adapter It would need to check if there is a envFile property on the config, if so replace it with env with the content from the file and then call on_config with the modified configuration.

thanhdatvo commented 10 months ago

Hi, I have same issue that dap-go cannot process envFile in launch.json Is there any works or improvements on this?

Thank you,