简体   繁体   English

VSCODE 通过代理在远程服务器上运行 gdb

[英]VSCODE run gdb on remote server through proxy

I'm trying to use native debug ( https://marketplace.visualstudio.com/items?itemName=webfreak.debug ) extention in vscode to launch gdb on a remote server through ssh.我正在尝试在 vscode 中使用本机调试( https://marketplace.visualstudio.com/items?itemName=webfreak.debug )扩展通过 ssh 在远程服务器上启动 gdb。 It's working when I'm connecting directly to remote sever :当我直接连接到远程服务器时它正在工作:

{
"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"
    }
]

} }

Is there any way to launch gdb on remote server through proxy ?有没有办法通过代理在远程服务器上启动 gdb? Let https://www.npmjs.com/package/ssh2 command for example use my .ssh/config file例如让https://www.npmjs.com/package/ssh2命令使用我的 .ssh/config 文件

I want to launch gdb on remote server yyy.yy.yyy.yyy through a proxy xxx.xx.xxx.xxx我想通过代理 xxx.xx.xxx.xxx 在远程服务器 yyy.yy.yyy.yyy 上启动 gdb

It's working !它的工作! I changed the code of the webfreak.debug to handle ssh proxyCommand, using ssh2-promise : https://www.npmjs.com/package/ssh2-promise instead of ssh2我更改了 webfreak.debug 的代码来处理 ssh proxyCommand,使用 ssh2-promise : https ://www.npmjs.com/package/ssh2-promise 而不是 ssh2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM