vscode go debug無法啟動問題


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

 

 

解決辦法:

將文件單獨拷貝至新的目錄,只有一個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文件,所以始終無法啟動。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM