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

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM