delve: could not launch process on m1
could not launch process on m1
- What version of Delve are you using (
dlv version
)? Delve Debugger Version: 1.6.0 Build: 75485427957fba167a6eaca76b1ee9549d62916f - What version of Go are you using? (
go version
)? go version go1.16beta1 darwin/arm64 - What operating system and processor architecture are you using? MacBook Air (M1, 2020) Big Sur 11.1
- What did you do? Try to run go application
{
// 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": [
{
"showLog": true,
"name": "app",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}",
"cwd": "${workspaceFolder}/bin",
"envFile": "${workspaceFolder}/.env",
}
]
}
- What did you expect to see?
API server listening at: 127.0.0.1:20210
could not launch process: stub exited while waiting for connection: exit status 0
2021-01-29T14:50:43+03:00 info layer=debugger launching process with args: [.../__debug_bin]
But, if I run
CGO_ENABLED=0 arch -arch arm64 dlv debug --log --headless .
all fine. How I can launch dlv with arm64 mod by default ?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 22 (7 by maintainers)
I only find this https://developer.apple.com/forums/thread/662738 But I can’t find, how I can run dlv with prefix
arch -arch arm64
in VSCodeor setup arm64 by default with rosetta2
@hyangah Thanks a lot !!!
Hi pwmcintyre
you are save my life. your step is good
Thanks
my problem was that i installed
amd
and notarm
(URLs so similar!)FIX:
i had to sudo remove my go dir (the installer didn’t do this properly):
“API server listening at: 127.0.0.1:2826” - means dlv was found and launched and was running. “could not launch process” - means dlv was not able to launch the process.
@Jerry-yz You can use
go.alternateTools
setting. But now both Go and VS Code officially support M1, so you will not need this hack any further if you install the correct VS Code and the correct Go tool chain.VS Code: https://code.visualstudio.com/download --> select “Universal” or “Apple Silicon” installer
Go: darwin-arm64 installer at https://golang.org/dl/go1.16.7.darwin-arm64.pkg