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

解决方法:

打开调试面板  VSCode->查看->调试

添加调试目标 在"没有调试"的下拉框中点击"添加配置.."添加目标调试配置

在"env": {},中加入%go_path即可解决。 路径斜线注意要以\

image

{
    // 使用 IntelliSense 了解相关属性。 
    // 悬停以查看现有属性的描述。
    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        
        {
            "name": "Launch",
            "type": "go",
            "request": "launch",
            "mode": "auto",
            "remotePath": "",
            "port": 2345,
            "host": "127.0.0.1",
            "program": "${fileDirname}",
            "env": {},
            "args": [],
            "showLog": false
        }
    ]
}

猜你喜欢

转载自www.cnblogs.com/LC161616/p/9727251.html
今日推荐