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}\\”,将其修改为项目路径,则错误解决。

 

    原文作者:yshy
    原文地址: https://www.cnblogs.com/yshyee/p/6734169.html
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞