-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Support debugging programs with multiple goroutines #2338
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
Hi: I have the same request, and I have finished it But I dont know whether this repo is still developing, so maybe I will do a pull request, and then, I will fork a repo |
I have made a pr for this, and for your questions, I will try to answer it:
2 & 3 , it seems different, but the have the same reason, a little difficult to expain because my poor english... In golang dlv(which vim-go use this to debug), breakpoint will stop all goroutines running, but there is no limit that one goroutine run at the same time, for dlv, when you type next, it stopped and tell you it stopped when It runs to "next line", but sometimes(most of times), the next line is not in your current goroutine, for vim-go, it must know this behavior and try to deal with it, vim-go must wait for "next" stops at the current debug goroutine and then stop, but vim-go not do this, so as what you see, when multi goroutine running, "next" will jump to random gorouting and stopped, then the next failed In my pr, I fixed this problem, when you debug in one goroutine, the "next" command will always skip to the same goroutine the next line, And I add a command: GoDebugGoRoutine + Id, to switch goroutines, after switch goroutine, the "next" command will run in new goroutine Wish you like it |
feat/#2338: support debug multi goroutine
Goroutines are something of a major feature of Go. Over 8% of the language keywords are dedicated specifically to this feature and it has been used as a selling point for the language throughout its history.
It is unfortunate that vim-go debugger has some serious shortcomings when it comes to debugging programs that use more than one goroutine:
Configuration (MUST fill this out):
vim-go version:
1.20
The text was updated successfully, but these errors were encountered: