Loading

vscode golang开启debug

vscode开启golangdebug

第一

要选择对golang版本,然后安装
我的是mac m1就选择如图

第二

安装对dlv
go get -u github.com/go-delve/delve/cmd/dlv
否则可能报错

could not launch process: can not run under Rosetta, check that the installed build of
 Go is right for your CPU architecture Process exiting with code: 1

第三

开启debug

选择vscode默认设置即可

posted @ 2022-09-09 14:27  _小孟同学  阅读(77)  评论(0编辑  收藏  举报