ray-x / go.nvim

G'day Nvimer, Joyful Gopher: Discover the Feature-Rich Go Plugin for Neovim
MIT License
2.09k stars 122 forks source link

Dap configuration attribute "envFile" doesn't work #122

Closed niklod closed 2 years ago

niklod commented 2 years ago

Hello! Could you pls help me realise what I do wrong with debug configuration

My launch.json:

{
            "name": "apigateway",
            "type": "go",
            "request": "launch",
            "mode": "debug",
            "program": "${workspaceFolder}/cmd/apigateway",
            "env": {
            },
            "envFile": "${workspaceFolder}/deployments/env/api-gw.prod.env",
            "showLog": true,
            "args": []
}

Env file content:

SERVICE_ENVIRONMENT=production
SERVICES_DECKS_LISTEN_ADDRESS=localhost:8183
SERVICES_CARDS_LISTEN_ADDRESS=localhost:8181
SERVICES_BLOG_LISTEN_ADDRESS=localhost:8182
SERVICES_PLAYER_LISTEN_ADDRESS=localhost:8188
SERVICES_TWITCH_LISTEN_ADDRESS=localhost:8184
SERVICES_LEADERBOARD_LISTEN_ADDRESS=localhost:8185
SERVICES_TIERLIST_LISTEN_ADDRESS=localhost:8186
SERVICES_STATISTICS_LISTEN_ADDRESS=localhost:8187
SERVICES_TOPDECKS_LISTEN_ADDRESS=localhost:8189
SERVICES_RIOT_LOADER_LISTEN_ADDRESS=localhost:8190
SERVICES_STATISTICS_IS_ENABLED=true
SERVICES_RIOT_LOADER_ENABLED=true
DEPENDENCIES_REDIS_PASSWORD=redis_pass
DEPENDENCIES_REDIS_DB=0
DEPENDENCIES_REDIS_MAX_RETRIES=46

When debug session starts env variables just don't attach to it. If I just copying them to the "env" attribute, all works well.

Is it something wrong with my .env file formatting?

ray-x commented 2 years ago

In fact, dap does not implement envFile loads. Please submit an issue on this subject (https://github.com/mfussenegger/nvim-dap)

niklod commented 2 years ago

nvim-dap feature request https://github.com/mfussenegger/nvim-dap/issues/543