I've experienced this as well. Typically, whenever my application stops abruptly it displays this proc.go
, for a few different reasons. If you're not seeing a panic in the call stack then I'm not sure what that reason would be.
You could make a few changes to your launch.json
file to troubleshoot:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "server",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "cmd/server/main.go",
"env": {
"DEBUG": "true"
},
"buildFlags": "-gcflags=all=-N =l" // disables optimizations, which makes debugging smoother and more predictable.
"dlvFlags": ["--log"] // logs Delve activity in the Debug Console to help you trace what’s going on.
// "console": "externalTerminal",
// "args": [">", "${workspaceFolder}/output.txt"]
}
]
}
Also, you can try updating the 'GO' extension in VS code if outdated.
Would you be able to share delve activity logs from the debug console after running it with the above changes if the issue persists?