栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

vscode远程免密登录、多屏打开同一项目、python项目调试launch.json设置

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

vscode远程免密登录、多屏打开同一项目、python项目调试launch.json设置

1、vscode免密登录远程服务器 VS code ssh免密登陆 1.) winows 下用ssh-keygen 生成公钥和秘钥(使用git Bash Here) 使用命令 ssh-keygen.exe -t rsa (名称,如id_rsamr_rsa) 2.)将公钥发送到服务器 ssh-copy-id -i .ssh/id_rsa.pub user@**.** //(user为服务器用户名,**.**服务器地址 3.)vscode插件Remote Development如果已经配置好对应的服务器,那么下次再ssh登陆时,就不用输密码了 另外,vscode ssh的配置文件ssh_config路径C:Users用户名.ssh,生成公钥私钥放的位置也在儿 # Read more about SSH config files: https://linux.die.net/man/5/ssh_config Host autotest     HostName **.**     Port 22     User **     IdentityFile C:UsersMr.sshmr_rsa 4、vscode远程setting.json设置 {     "workbench.colorTheme": "Default Dark+",     "[python]": {             "editor.wordbasedSuggestions": false     },     "window.zoomLevel": 1,     "workbench.editorAssociations": {         "*.pyc": "default"     },     "jupyter.interactiveWindowMode": "perFile",     "workbench.panel.defaultLocation": "right",     "terminal.integrated.allowChords": false,     "editor.hover.delay": 100,     "editor.renderControlCharacters": true,     "http.proxySupport": "on",     "settingsSync.ignoredSettings": [         "-http.proxy"     ],     "remote.SSH.defaultForwardedPorts": [     ],     "remote.SSH.remotePlatform": {         "autotest": "linux",     },     "editor.scrollbar.horizontalScrollbarSize": 122,     "editor.fontSize": 16,     "terminal.integrated.inheritEnv": false,     "remote.SSH.path": "‪C:\Program Files\OpenSSH-Win64\ssh.exe", } 5、vscode远程服务器调试launch.json配置 {     "configurations": [         {             "name": "Python: 远程连接",             "type": "python",             // "request": "attach",             "connect": {                 "host": "**.**",  //地址                 "port": 22             },             "pathMappings": [                 {                     "localRoot": "${workspaceFolder}",                     "remoteRoot": "."                 }             ],             "debugOptions": [                 "WaitOnAbnormalExit",                 "WaitOnNormalExit",                 "RedirectOutput"             ],             "python.pythonPath":"~/anaconda3/envs/pytorch_env/bin/python",   //服务器中解释器路径             "request": "launch",             "program": "${file}",             "console": "integratedTerminal"         }     ] } 6、vscode多屏打开同一个项目 ctrl+Shift+P
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/310989.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号