MacOS 下使用VSCode进行GoLang Test报错
could not launch process: debugserver or lldb-server not found: install XCode's command line tools or lldb-server
问题描述
使用VSCode 进行Debug GoLang代码,提示报错:

launch.js 配置信息
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "go",
"request": "launch",
"mode": "test",
// "program": "${fileDirname}",
"host": "127.0.0.1",
"program": "${workerspace}/GoStart/day02/array_test.go",
"env": {},
"args": []
}
]
}
解决方案
打开「终端」,输入:

安装即可

运行成功
