如圖,進度條總是處於滑動狀態,始終無法啟動程序:

解決辦法:
將文件單獨拷貝至新的目錄,只有一個go文件,重新創建launch.json,會生成.vscode目錄
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${fileDirname}"
}
]
}
此時debug啟動文件,成功。
原因估計是因為文件在嵌套目錄,導致找不到對應的launch.json文件,所以始終無法啟動。
