Linux 远程调试

Posted by Shen Chaoran on December 15, 2018

使用IDE远程编辑

Remote FS: 打开远程的一个路径

code --folder-uri sftp://CMIP-backend/

# config in setting.json
"remotefs.remote": {
    "CMIP-backend": {
        "scheme": "sftp",
        "host": "192.168.139.128",
        "username": "root",
        "password": "scr1994",
        "connectTimeout": 10000,
        "rootPath": "/home/shencr/Projects/model_comparison_backend"
    }
}

Remote VSCode:

ssh -R 52698:localhost:52698 root@192.168.139.128
rmate -p 52698 <filepath>

Remote Workspace: 打开整个虚拟机的文件系统

远程调试