-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
cannot enter commands while waiting for the debugger to yield #2915
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
Comments
If there are no breakpoints set, then the application is running and Vim is waiting for the debugger to break. That's probably the root cause of what you're seeing. This can be improved, though; I'll see what I can do.
🤔 Can you duplicate this relatively reliably? Having the requests and responses to and from delve would help me get to a root cause. If you'll |
Sure I'll try to find steps that lead to a consistently reproducible case |
Ok so here are the steps taken to get to reproduce
output of debugger-commands is: After Output:
|
Are you sending an http request to your http server after running |
Ah, it returns control after a timeout reading from the socket. Unfortunately, though, I don't see the error you're encountering, though there was recently some changes to the debugger that might affect this. What version of vim-go are you using? |
Whoops forgot to fill in vim-go version in the original issue. I'm on commit |
That commit was before a recent fix that resolved the After updating, you'll still see your Vim "hang". That's because it's waiting on delve to hit a breakpoint. It will wait up to 20 seconds. Once we confirm that your |
Updating to the latest master resolves the |
Having a much better experience using the vim-go debugger. Let me know what else I can do to help once you've implemented some of the UX changes. |
Do not block while waiting on responses from delve so that users can continue to interact Vim. Fixes fatih#2915
@MatthewMarkgraaff do you want to give #2932 a try? |
So vim is blocking after If I had setup a breakpoint prior to starting the debugger session and hit the breakpoint, vim is interactive again and I'm able to set more breakpoints etc. If I had not setup any breakpoints prior to starting the debugging session, I am not able to during the debug session. I have to stop the debugger, set a breakpoint then start it back up. I am able to Hope I'm explaining this clearly enough. |
Are you seeing that in #2932 or on master? |
@MatthewMarkgraaff should I go ahead and merge #2932 or do you think there are problems with it? Any guidance you can provide would be helpful, especially in the form of a simple application and instructions to demonstrate the problems you see with it. |
Apologies for the delay in response. |
The only remaining comment is that I can't run |
Thanks @MatthewMarkgraaff . I'll plan to address the |
I will hijack this issue because I am having a very similar issue. When I start the debugger with I tried using delve from the command line to see if it was the source of the problem but it ran smoothly. This
printed nothing. The Go Output, after I send the interrupt command has a bunch of memory access errors though:
Anything else I could try? |
Firstly, thank you so much for all your effort on this package. I'm having such a great time hacking away on go inside vim now thanks to this plugin! Just having some developer experience issues when working with the built in delve / debugger support.
What did you do? (required: The issue will be closed when not provided)
On Occasion
GoDebugContinue
andGoDebugStop
cause vim instance to freeze. Can't execute further commands or navigate the editor.What did you expect to happen?
GoDebugContinue
should continue to the next breakpoint, if no further breakpoints are set, control should be given back to the developer to navigate vim and set more breakpoints or to just navigate normally.What happened instead?
Vim hangs sometimes indefinitely and requires a force quit, other times for a long period of time before vim becomes responsive again
Sometimes setting a breakpoint throws:
vim-go: Vim(let):E121: Undefined variable: result
General experience is laggy and the debugging experience differs on each use.
Configuration (MUST fill this out):
vim-go version:
vimrc
you used to reproduce:vimrc
Vim version (first three lines from
:version
):VIM - Vi IMproved 8.1 (2018 May 18, compiled Jun 26 2019 04:37:19)
macOS version
Included patches: 1-1600
Go version (
go version
):go1.13.4
Go environment
go env
Output:gopls version
gopls version
Output:dlv version
Delve Debugger
Version: 1.4.0
Build: $Id: 67422e6f7148fa1efa0eac1423ab5594b223d93b
simple code example
code example
Example:I can try take a video of the experience I'm having, as it's quite difficult to articulate in writing.
The text was updated successfully, but these errors were encountered: