sebdah / vim-delve

Neovim / Vim integration for Delve
MIT License
502 stars 24 forks source link

Add support for dlv exec #9

Closed sebdah closed 7 years ago

sebdah commented 7 years ago

This makes it possible to debug pre-built binaries.

Closes #5 Closes #8

cflewis commented 7 years ago

Something doesn't work quite right in my case. If I run :DlvExec path/to/my/bin from an empty nvim buffer, it works as expected. If I run it from a buffer populated with a file, it outputs:


could not launch process: fork/exec path/to/my/bin: no such file or directory                              
[Process exited 1]

DlvExec is trying to go relative from the file I am at, whereas I would like to go from the current working directory. I can believe that going relative is totally the right thing to do for most cases, but it doesn't work for me. I had to do this instead:

:execute 'DlvExec ' . getcwd() . '/path/to/my/bin'

If this is what you want, adding this to my vimrc is no problem for me. I just wanted to make sure you were aware :)

sebdah commented 7 years ago

Thanks for the quick feedback. I'll look this through later!

sebdah commented 7 years ago

I've written a fix that assumes nothing from the buffer context. This should get you a more natural behavior.

sebdah commented 7 years ago

If you can have a look @cflewis please do, otherwise I think I'll merge this tomorrow sometime. Thanks again for the feedback.

cflewis commented 7 years ago

LGTM! Awesome!