如何以根用户身份在VScode中调试Go

时间:2018-07-17 07:54:13

标签: debugging go visual-studio-code root delve

我想在Visual Studio代码中调试containerd。但是容器化需要以root身份运行。没有任何选项可以使用root特权启动作业吗?

这是我当前的配置:

{
    // 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": "debug",
            "remotePath": "",
            "port": 2345,
            "host": "127.0.0.1",
            "program": "/home/user/go/src/github.com/containerd/containerd/cmd/containerd",
            "env": {},
            "args": [],
            "showLog": true
        }
    ]
}

0 个答案:

没有答案