Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GoLand on Apple Silicon can not debug golang project

Edit 2021-01-28: This whole question is now obsolete because GoLand 2020.3.2 was released today, and it includes a working delve. Don't forget to remove alterations you might have made, as the release notes point out.

I am trying to debug golang project with GoLand on Apple Silicon, but it does not work; error following:

API server listening at: [::]:62619
debugserver-@(#)PROGRAM:LLDB  PROJECT:lldb-1200.0.44 for x86_64.
error: failed to launch process /Library/Developer/CommandLineTools/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/debugserver: (os/kern) invalid argument
Exiting.
could not launch process: stub exited while waiting for connection: exit status 0
like image 248
user14892075 Avatar asked Nov 30 '22 07:11

user14892075


1 Answers

I have golang 1.16.6 and still facing the same issue with this error message: Use go sdk for darwin/arm64

my solution was to add the following ENVs

GOOS=darwin, GOARCH=arm64

enter image description here

like image 166
Mr. Crowley Avatar answered Dec 06 '22 17:12

Mr. Crowley