-
Notifications
You must be signed in to change notification settings - Fork 763
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
debug: error message when debug run withoun launch.json #1113
Comments
Thanks for filing an issue! It seems these two configurations happen to hit the timing of events differently. The terminated event is sent before the initial ThreadsRequest from vscode, causing an error when trying to get the debug state.
We can guard against requests sent after delve has exited to fix this. |
Change https://golang.org/cl/286492 mentions this issue: |
There is an initial ThreadsRequest after initialization from vscode. If the program exits too quickly, this request may come after delve has already exited. There is already a check to ignore an error from ListGoRoutines if the debugState.exited. This change adds the same check to threadsRequest before isDebuggeeRunning is called, which tries to get the debugState from delve. Updates #1113 Change-Id: I01b1f2af9d7357c2363709b94435b797aa042459 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/286492 Trust: Suzy Mueller <[email protected]> Run-TryBot: Suzy Mueller <[email protected]> Reviewed-by: Polina Sokolova <[email protected]>
@suzmue Is this fixed by cl/286492? Can we close this? |
@aleksandr-shevchenko The fix has not yet been released (it will be released in 0.23.0). Could you try to install and use 'Go Nightly' to confirm that the error still appears? Thank you! |
Suzi, 'Go Nightly' works without error. Thank you very much. |
@aleksandr-shevchenko Thanks for trying it out and letting us know! Will close this issue :) |
I am getting this same error when I placed a breakpoint in an empty line, could not figure out why it was crashing |
@IvanTurgenev could you please file a new issue with the debugging logs so we can look into what is happening? Instructions for capturing logs can be found here. |
a.go:
package main
import "fmt"
func main() {
fmt.Println(2 + 3)
}
API server listening at: 127.0.0.1:27232
5
Failed to get state - Process 11708 has exited with status 0
dumpStacktrace - Failed to get debugger state Process 11708 has exited with status 0
dumpStacktrace: Failed to produce stack traceProcess 11708 has exited with status 0
Process exiting with code: 0
VSCode and golang latest version, but this behavior I see last half year.
My custom settings
"go.formatTool": "goimports",
"go.useLanguageServer": true,
"go.buildOnSave": "off",
"go.lintOnSave": "file",
"go.docsTool": "gogetdoc",
"[go]": {
"editor.detectIndentation": false,
"editor.tabSize": 4,
"editor.insertSpaces": true,
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"editor.snippetSuggestions": "none"
},
"[go.mod]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
"gopls": {
"usePlaceholders": true
},
The text was updated successfully, but these errors were encountered: