VS Code調試Golang提示Failed to continue:Check the debug console for details.

VS Code調試Golang提示Failed to continue:Check the debug console for details.

解決方法:

打開調試面板  VSCode->查看->調試 或直接打開“launch.json”

{
    "launch": {


        "configurations": [
            {
                "name": "Launch",
                "type": "go",
                "request": "launch",
                "mode": "auto",
                "program": "${fileDirname}",
                "env": {
                    "go.gopath": "C:\\Users\\Administrator\\go"
                },
                "args": []
            }    

        ]
    },
    "terminal.integrated.automationShell.windows": "C:\\WINDOWS\\System32\\cmd.exe"

}

添加

"program": "${fileDirname}"

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章