首页 > 其他 > 详细

VSCode远程调试Go程序方法(Attach)

时间:2018-05-21 21:05:53      阅读:959      评论:0      收藏:0      [点我收藏+]
  1. set launch.json
        {
            "name": "Attach",
            "type": "go",
            "request": "launch",
            "mode": "remote",
            "remotePath": "${workspaceRoot}",
            "port": 2345,
            "host": "127.0.0.1",
            "program": "${workspaceRoot}",
            "env": {},
            "args": [],
            "showLog": true
        }
  1. go build && run
  2. get pid && dlv attach pid --headless --listen=:2345 --log
  3. in VSCode, Click begin debug button

VSCode远程调试Go程序方法(Attach)

原文:https://www.cnblogs.com/mrblue/p/9069084.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!