golang debugger : could not launch process: EOF
Very similar to this issue; but that is from 5 years ago.
I am setting up a new Mac running OSX Ventura 13.4. I downloaded the apple arm version of IntelliJ (Build #IU-231.9011.34) and installed the Go plugin (231.9011.4)
The go version is: go version go1.20.5 darwin/arm64
I created a new go project using just the sample code:
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}
I create a Run configuration the same as always to run main.go.
If I 'Run', the configuration; it runs and the output is printed to the console in the ide Debug tool window as expected.
If I attempt to 'Debug' the configuration, I get the following output in the console of the Debug tool:
-------
GOROOT=/usr/local/go #gosetup
GOPATH=/Users/john/go #gosetup
/usr/local/go/bin/go build -o /Users/john/Library/Caches/JetBrains/IntelliJIdea2023.1/tmp/GoLand/___go_build_check -gcflags all=-N -l . #gosetup
"/Users/john/Library/Application Support/JetBrains/IntelliJIdea2023.1/plugins/go-plugin/lib/dlv/macarm/dlv" --listen=127.0.0.1:50412 --headless=true --api-version=2 --check-go-version=false --only-same-user=false exec /Users/john/Library/Caches/JetBrains/IntelliJIdea2023.1/tmp/GoLand/___go_build_check --
API server listening at: 127.0.0.1:50412
debugserver-@(#)PROGRAM:LLDB PROJECT:lldb-1200.0.44
GOPATH=/Users/john/go #gosetup
/usr/local/go/bin/go build -o /Users/john/Library/Caches/JetBrains/IntelliJIdea2023.1/tmp/GoLand/___go_build_check -gcflags all=-N -l . #gosetup
"/Users/john/Library/Application Support/JetBrains/IntelliJIdea2023.1/plugins/go-plugin/lib/dlv/macarm/dlv" --listen=127.0.0.1:50412 --headless=true --api-version=2 --check-go-version=false --only-same-user=false exec /Users/john/Library/Caches/JetBrains/IntelliJIdea2023.1/tmp/GoLand/___go_build_check --
API server listening at: 127.0.0.1:50412
debugserver-@(#)PROGRAM:LLDB PROJECT:lldb-1200.0.44
for arm64.
Got a connection, launched process /Users/john/Library/Caches/JetBrains/IntelliJIdea2023.1/tmp/GoLand/___go_build_check (pid = 11367).
could not launch process: EOF
Debugger finished with the exit code 1
------
From the idea log file, I see a suspect error:
2023-06-19 16:55:00,651 [1070422] INFO - #com.goide.dlv.DlvVm - Connection closed
org.jetbrains.concurrency.MessageError: Connection closed
Full idea.log upload is Upload id: 2023_06_19_JdZPFq2RePjXzn2aPcxd5f (file: idea.log)
So it appears there is some kind of problem using the debugger.
Appreciate any assistance, as I am completely stopped with this.
Thanks, John
请先登录再写评论。
Ok, solved the problem after looking around a bit more. For this on the go-delve issue board: https://github.com/go-delve/delve/issues/2794
Apparently, needed to reinstall xcode command line tools. I actually needed to uninstall them which seems odd since I already had the latest install of them.
In any case, the following fixed the problem: