zhmg23

我们是如此的不同

win10+vscode调试Go报错

在win10上通过vscode来调试go,安装后之后,跑个Hello world,但一跑就报错是:

failed to continue check the debug console for details golang

查了好多,都不对,最终是修改launch.json

 "version": "0.2.0",


    "configurations": [

        {

            "name": "Launch file",

            "type": "go",

            "request": "launch",

            "mode": "auto",

            "program": "${file}",

            "env": {

              "PATH": "你的GOPATH路径"

            },

            "args": []

          }

    ]

}

注:cmd下运行go env可获取到




评论