欢迎访问Ningto's博客

Menu
  • 首页
  • 归档
  • 关于
  • 必应壁纸
  • 我的网盘
Menu

golang vscode launch.json配置

最后更新 2021-01-13 10:07:46   阅读量 231

每次调试运行都要先打开main.go然后在菜单里点击Run->Start Debugging或者F5比较麻烦,主要是每次都要定位了main.go文件,这样当我编辑完其他文件后,都要切换一下才能运行。

下面增加一下Launch.json配置就可以直接点击左侧的debug按钮运行了,在Launch菜单下的Add Configuration,内容如下:

{
    // 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",
            "type": "go",
            "request": "launch",
            "mode": "auto",
            "program": "${workspaceFolder}",
            "env": {},
            "args": []
        }
    ]
}
(转载本站文章请注明作者和出处:泞途 - ningto.com)
下一篇 – gin多模板、模板嵌套使用方法
上一篇 – Chrome简单插件开发——自动初始化gitalk评论

tujiaw@163.com

推荐文章

CentOS6 yum The requested URL returned error: 404 Not Found

CentOS7 U盘安装 No Caching mode page found

golang 单例模式

CentOS7 systemctl service

golang 中介者模式

CentOS7 debuginfo-install

给Markdown增加TOC(Table of Contents)

win32应用程序内存不足

标签云

Tips Design C/C++ Javascript Go Database Linux Node.js Android Windows Mac Mobile Life Boost React Product Qt Shell MQ Java MongoDB Bug Tools IOS Web
Copyright © 2016 Welcome To Ningto Blog | 鄂ICP备17003086号