Closed jsternberg closed 6 days ago
Thanks for the PR but this is the wrong fix and would end up breaking other adapters.
Adapters tend to treat remote access in one of two ways:
server
adapter definition. It looks like this is the case for delve?The proper fix would be to change the adapter configuration that nvim-dap-go is making, similar to the one used in nvim-dap-python:
Thanks for the direction. I'll do that instead.
Related to https://github.com/leoluz/nvim-dap-go/issues/35. When attempting to attach to a remote dlv process, the nvim-dap-go plugin would attempt to launch an executable on the same port it was supposed to connect to. This would fail and would cause the plugin not to attach to the existingøØrt.
This is because nvim-dap-go switched to using the included adapter and the adapter does not check if the request is launch or attach before attempting to launch the dlv process.
This is fixed by removing executable from the adapter if the config uses attach since an attach request shouldn't be launching an executable anyway.