0

我正在尝试在 vscode 中使用本机调试( https://marketplace.visualstudio.com/items?itemName=webfreak.debug )扩展来通过 ssh 在远程服务器上启动 gdb。当我直接连接到远程服务器时它正在工作:

{
"version": "0.2.0",
"configurations": [
    {
        "type": "gdb",
        "request": "launch",
        "name": "Launch Program (SSH)",
        "target": "./appli",
        "cwd": "${workspaceFolderBasename}",
        "arguments": "",
        "ssh": {
            "host": "xxx.xx.xxx.xxx",
            "cwd": "/home/username/project",
            "keyfile": "/home/username/.ssh/id_rsa",
            "user": "username"
        },
        "valuesFormatting": "parseText"
    }
]

}

有没有办法通过代理在远程服务器上启动 gdb?让https://www.npmjs.com/package/ssh2 命令例如使用我的 .ssh/config 文件

我想通过代理 xxx.xx.xxx.xxx 在远程服务器 yyy.yy.yyy.yyy 上启动 gdb

4

1 回答 1

0

它正在工作!我使用 ssh2-promise 更改了 webfreak.debug 的代码来处理 ssh proxyCommand:https ://www.npmjs.com/package/ssh2-promise而不是 ssh2

于 2019-12-02T12:42:27.713 回答