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