Skip to content
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

Failed to launch: could not launch process: stub exited while waiting for connection: exit status 0 #3

Open
yahsinhuangtw opened this issue Feb 8, 2022 · 1 comment

Comments

@yahsinhuangtw
Copy link

Problem

Hello Suzy, thanks for creating this debugging treasure hunt. I tried to follow your presentation GopherCon 2021: Suzy Mueller - Debugging Treasure Hunt, but quickly came across some problems.

I navigated to main.go, hit the Launch Package button, then this error message showed up: Failed to launch: could not launch process: stub exited while waiting for connection: exit status 0
Screen Shot 2022-02-08 at 10 48 48 PM

Here is my system information:
go version go1.17.6 darwin/arm64
macOS Big Sur Version 11.0.1 (20B29) MacBook Air (M1, 2020)

I wonder if you have any suggestions?

More information for debugging:

Starting: [/Users/yahsinhuang/go/bin/dlv]() dap --check-go-version=false --log=true --log-output=dap --listen=127.0.0.1:60940 --log-dest=3 from [/Users/yahsinhuang/delve/gophercon]()
DAP server listening at: 127.0.0.1:60940
2022-02-08T22:47:57+08:00 debug layer=dap DAP server pid = 95395
2022-02-08T22:47:57+08:00 debug layer=dap DAP connection 1 started
2022-02-08T22:47:57+08:00 debug layer=dap parsed launch config: {
	"mode": "debug",
	"program": ".",
	"backend": "default",
	"stackTraceDepth": 50
}
2022-02-08T22:47:57+08:00 debug layer=dap building from "[/Users/yahsinhuang/delve/gophercon]()": [go build -o [/var/folders/yr/2csn9t915j5573flrlw9wjp40000gn/T/__debug_bin1264941409]() -gcflags all=-N -l .]
2022-02-08T22:47:57+08:00 debug layer=dap launching binary '[/var/folders/yr/2csn9t915j5573flrlw9wjp40000gn/T/__debug_bin1264941409]()' with config: {
	"mode": "debug",
	"program": "[/Users/yahsinhuang/delve/gophercon]()",
	"cwd": "[/Users/yahsinhuang/delve/gophercon]()",
	"output": "[/var/folders/yr/2csn9t915j5573flrlw9wjp40000gn/T/__debug_bin1264941409]()",
	"dlvCwd": "[/Users/yahsinhuang/delve/gophercon]()",
	"backend": "default",
	"stackTraceDepth": 50
}
2022-02-08T22:47:57+08:00 debug layer=dap Failed to launch: could not launch process: stub exited while waiting for connection: exit status 0
2022-02-08T22:47:57+08:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":2,"success":false,"command":"launch","message":"Failed to launch","body":{"error":{"id":3000,"format":"Failed to launch: could not launch process: stub exited while waiting for connection: exit status 0","showUser":true}}}

@hyangah
Copy link

hyangah commented Mar 1, 2022

Try to run dlv debug from the gophercon directory to see if LLDB error shows any hint.
I've seen cases where either vscode or dlv or go are not for M1, or you need extra config to enable developer mode (e.g. go-delve/delve issue 2382)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants