mac vscode 调试配置
安装Go语言调试工具dlv
前提
需要安装Xcode命令行工具。运行以下命令安装:
xcode-select --installdlv安装
go install github.com/derekparker/delve/cmd/dlv配置
配置settings.json中的GOROOT和GOPATH
点击VS Code,点击最顶部栏的Code选项,选中Preferences,点击Settings,选中Extensions,点击Go configuration,在点击Edit in settings.json,打开settings.json文件,可以通过搜索go.go查到,settings.json 文件里面默认的go.gopath和go.goroot都是null,需要自己设置,设置完gopath和goroot后按command+s保存文件。
配置launch.json
{ "version": "0.2.0", "configurations": [ { "name": "te", "type": "go", "request": "launch", "mode": "debug", "remotePath": "", "port": 23456, "host": "127.0.0.1", "program": "/Users/reyun/go/src/test/build.go", "args": [], "showLog": true, "trace": true } ] }
相关推荐
Yvettre 2020-09-15
小焊猪web前端 2020-11-04
changcongying 2020-11-02
azhedashuaibi 2020-09-15
zhongfuyu 2020-08-16
lichuanlong00 2020-08-15
gsl 2020-08-15
mmwalker 2020-08-11
山有木兮卿有意 2020-08-03
Java编程语言学习 2020-07-29
举 2020-07-28
sshong 2020-07-19
fushilin 2020-07-05
80296630 2020-07-04
风雨断肠人 2020-06-14
ningningmingming 2020-06-14
hualala 2020-06-13
choupiaoyi 2020-06-13
Wytheme 2020-06-11