Closed slax0rr closed 4 years ago
@slax0rr @sebdah This would be useful for DlvConnect
in general which relies on local paths matching the debug executable. In addition to symlinks, this is often the case when using docker. Would love to see a feature for overriding the basepath or otherwise translating local->remote paths.
Hello,
I am running a
dlv exec somebin
in headless mode outside of vim and then using DlvConnect to connect to delve in order to debug my executable, but my workdir is just a symlink:/my/workdir/ -> /actual/location
Now, when I run
go build ....
inside/my/workdir/
this builds the exec with/my/workdir/
path, but, when vim-delve usesexpand('%:p')
on the file where I want to place a breakpoint it will use the/actual/location/
instead of my symlink, and of course, when delve receivesbreak /actual/location/some.go:123
it throws a not found error.Here is a possible solution to this issue:
Allow the user to set the root dir of the files, then just use this function to get the absolute file path when setting the breakpoints/tracepoints. Since this is a very specific issue, I thought I'd ask here before making a pull request, if you think that this is even worth fixing?