Substitute paths when connecting to remote headless dlv server #43
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
NeonXP/nvim-dap-go#43
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm currently using
nvim-dapandnvim-dap-goto connect to a headlessdlvserver running remotely in k8s. Unfortunately, the source code during compilation of the remote binary is different than my local source code, so by default most breakpoint functionality does not work.As far as I understand, path transformations occur client side and not on the
dlvserver. I can get this to work viadlv connecton my local machine either withconfig substitute-path <from> <to>or via thedlvconfig.yml file. Unfortunately, I haven't found a way to have the nvim dap client perform any path substitutions.This issue is more of an open question, but do you know if that's currently possible? Thanks in advance!
Build information
Remote
dlvservernvim-dap: v0.5.0nvim-dap-go: shab4ded7de579b4e2a85c203388233b54bf1028816I am not a user of
nvim-dap-go, but came across this issue with custom nvim-dap config.For me I use
substitutePathwith vscodelaunch.json, that works pretty well, maybe you can try using that.launch.json
@nnarayen I am also unaware of such configuration. Have you tried asking in the nvim-dap project?
I was able to set the
substitutionPathfrom configurations as described at https://github.com/mfussenegger/nvim-dap/issues/905.It requires some ingenuity as the
substitutePathneeds to match the remote path, but I have been able to debug applications running on Docker with the configuration below.It works like this.
@nnarayen can you please try the suggestion provided by @ryutah and confirm that it is working for you. Maybe we can improve the docs describing it for users with the same requirements.
Hi, debug in remote container in Kubernetes works fine for me.
Here is the full plugin config for
Lazy.I use 2345 port for communication with dlv, so my command in remote container is
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I can confirm that setup given from @ryutah works fine for me to debug in a remote container. In my case I use
/wdas my application path in docker, so I have to change it. This is my entirely setup:Dockerfile:
nvim setup:
docker-compose:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.