sebdah/vim-delve

Add dlv exec support

cflewis opened this issue · 3 comments

Thanks for this! This looks great!

I need to execute dlv using dlv exec because I work at Google and we use Bazel, not the normal Go structure.

Is it possible to do this with vim-delve?

I got it sort-of going by doing this, clearly getcwd() is bad but I think that's an artifact of working with Bazel. I can't get the breakpoints to work though... what am I missing?

" exec runs and attaches to a process.                                                                                                  
 function! delve#exec(dir, path)                                                                                                         
     call delve#runCommand(getcwd(), "exec " .a:path, 0, 0)                                                                              
endfunction  

Thanks for the feature request. That shouldn't be a biggie to add. I can write it sometime today I think. Or at least during the weekend. Would you mind trying it out so that it fits the use case?

The implementation was very straight forward. I have opened a PR #9 that solves this. When trying locally here it seemed to work fine. @cflewis if you could try it before I merge to master I'd be happy.

Cheers.