VScode-Go can't load package: package .: no buildable Go source files in

在VScode中调试Go程序时提示:

can't load package: package .: no buildable Go source files in d:\my_workspace\go_ws
exit status 1
Process exiting with code: 1
 
lauch.json配置如下:

{
"version": "0.2.0",
"configurations": [{

"name": "Launch",
"type": "go",
"request": "launch",
"mode": "debug",
"remotePath": "",
"port": 2345,
"host": "127.0.0.1",
"program": "${workspaceRoot}\\",
"env": {},
"args": [],
"showLog": true
}]
}

问题出在"program": "${workspaceRoot}\\",将其修改为项目路径,则错误解决。

 

posted @ 2017-04-19 16:34  yshy  阅读(7225)  评论(0编辑  收藏  举报