-
Notifications
You must be signed in to change notification settings - Fork 797
debug: stepping fails with 'next while nexting' error #119
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
thumbs up for this. happens all the time and kills a complex debug session. |
also wondering about the status of performance improvements for golang delve debug nexting. still quite slow and not clear what parameters to tweak for improvement. current config is...
|
It took me a minute to make sense of the original instructions because they appear to assume that the program stops on entry, which is not the default behavior. Everything works if the breakpoint at line 12 is set when stopped at line 23. Relevant logging:
|
@jkassis Please file an new issue for next performance improvements that are not related to the "next while nexting" error. Thank you. |
The "next while nexting" error is something you can recover from. Continue generally lets you finish the next operation. @jdowning100 @Basez @ventsislav-georgiev @lggomez
|
In my view this is undefined behavior because it would require an underlying execution model stating whether to in this scenario in order to handling it gracefully (like nested interrupts), so my guess is that delve neither wants to make such assumptions (or take that complexity in the backend) and it fails instead (rightfully so) 1 is more simple for the backend to implement but I prefer 2 on the user-level interaction, as the developer will be aware of what's happening |
@lggomez Actually, we are currently trying to implement 1) in go-delve/delve#2530, and it is getting tricky due to concurrency issues. So it got me wondering that was even something that users actually want. At leasts one user does not seem to (go-delve/delve/issues/2317). |
Well yeah, the concurrent breakpoints are a nuance that I underestimated now that I'm seeing the PR. Having the choice from the terminal as aarzilli says here go-delve/delve#2317 (comment) could be an option but not one I see easy to implement or even feasible from the VS Code UI so in this case it'd be preferable to just stop and go with one of the 2-4 variants. (assuming that concurrency is handled) 3 is more disruptive without notice but easier to implement, although 2 would be more informative to the user but more complex to implement, as it requires a modal and an additional continue request with the next code position 4 and 5 may feel more 'okayish' but are opinionated flows and we may fall again into an issue like go-delve/delve#2530, so I'm between 2 and 3 for now, given what you've just explained |
Option 2 has been implemented in
An explanation of the behavior can be found in the documentation: Why does my debug session have an invalid command error when I try to step?When stepping through a program on a particular goroutine, the debugger will make sure that the step is completed, even when interrupted by events on a different goroutine. If a breakpoint is hit on a different goroutine, the debug adapter will stop the program execution to allow you to inspect the state, even though the step request is still active. If you attempt to make another step request you will get an invalid command error. Use Continue to resume program execution. If you do not want the step request to be interrupted, you can disable all breakpoints from VS Code from the context menu in the Breakpoints view. |
From microsoft/vscode-go#2563 by @aarzilli:
pretty soon you will encounter the 'next while nexting' error.
For prior discussion on this, please see microsoft/vscode-go#2563
The text was updated successfully, but these errors were encountered: