Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce GoDebug #1198

Closed
wants to merge 1 commit into from
Closed

Introduce GoDebug #1198

wants to merge 1 commit into from

Conversation

jodosha
Copy link

@jodosha jodosha commented Feb 5, 2017

Hi, vim-go it's an essential plugin for me, thank you!


This is a proposal to introduce GoDebug command. It runs a debugging session in (Neo)Vim.
The debugger engine is delve, which needs to be installed on the developer's machine.

I haven't added it to the list of the GoInstallBinaries because on OSX requires Homebrew for automatic installation. In case of manual installation things get more complicated.


Another addition of this PR is the GoToggleBreakpoint command, to toggle a breakpoint from a buffer. It adds a visual sign in the gutter column.


Please note that this PR works only for NeoVim. I didn't manage to get it to work for Vim too. Please advise. 😄

I'm not sure if you want to add this debugging feature. If so, let me know, so I can fix the missing parts.


See it in action:

vim-go-debug

@fatih
Copy link
Owner

fatih commented Feb 5, 2017

Hi @jodosha

Thanks for the PR. Much appreciated. Unfortunately this is not a direct integration into vim and relies on Neovim's term feature. I think we should add a general solution, but both Vim and Neovim work differently in terms of jobs API. I'm not sure how to make it abstract enough. And usually Vim is first class citizen in vim-go.

Additionally I'm explicitly asked to open a Github issue (https://github.com/fatih/vim-go/blob/master/.github/CONTRIBUTING.md) to discuss features like this before opening a PR. Because I don't want everyone to spend on something so that later they learn that I'm not going to merge it (due the concerns outlined above).

We should not use delve's client instead Vim should be the client itself. I'm looking forward for a more integrated, Vim only, where Vim is a client to the delve server. Thanks again for your contribution but this is not something that I have in my mind. I'm closing this, I hope you understand my point.

@fatih fatih closed this Feb 5, 2017
@jodosha
Copy link
Author

jodosha commented Feb 6, 2017

Hey @fatih thanks for getting back so quickly! No worries.


A one note about Vim vs NeoVim. This PR works only w/ NeoVim because I didn't succeed with Vim and I was looking for advice. 😃 I'm aware of your "Vim first" choice. 😉

If you look at the code, I copied and pasted the logic from GoTest, trying to make it to work with Vim too: https://github.com/fatih/vim-go/pull/1198/files#diff-a3998a862a20bc1665a15c84f401349fR422


I'll try to extract a standalone plugin for this. Thank you very much for vim-go.

@arp242
Copy link
Contributor

arp242 commented Jun 27, 2017

Note: this PR was continued in this plugin by the PR author: https://github.com/jodosha/vim-godebug

(For those who ended up here through a search).

@arp242 arp242 mentioned this pull request Jul 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants