当前位置:网站首页>使用vscode进行远程编辑和调试
使用vscode进行远程编辑和调试
2022-07-23 05:47:00 【lightninghenry】
在嵌入式开发的时候,很多时候需要对边缘端的设备代码进行维护,编译等,传统的终端指令没有vscode好用,那么如何使用vscode实现远程编译和调试呢?请看下文
通过本文章可实现:
- 使用vscode对远端设备的工程进行编辑和调试
- 远端设备不需要安装vscode
至于为什么要用vscode,我就不多说了,真的很好用,谁用谁知道^^
准备工作:
- 本地可以通过命令窗ssh到远端设备
- 本地安装好vscode,我现在用的是1.69版本
- 在vscode上安装Remote Development插件
使用流程:
步骤1:

按照上图红色圈对应的数字,依次点击,打开本地的config文件
步骤2:
编辑上一步打开的config文件,代码就3行:
Host devicename
HostName 192.168.100.9
User myname- 第一行:Host 后面加远端设备的名字,名字随便起
- 第二行:HostName 后面加远端设备的网络IP号
- 第三行:User 后面加你登录远端设备的账户名
如果需要连接多个远端设备,把上面的代码再复制一遍:
Host device1
HostName 192.168.100.9
User myname1
Host device2
HostName 192.168.100.10
User myname2
Host device3
HostName 192.168.100.11
User myname3友情提醒:代码改好记得保存
步骤3:
步骤2正确做完后,你就能在vscode左侧看到远端的设备名

点击图中红色框,打开远端设备,这时会弹出一个新的vscode

选择远端的系统类型,可以看出vscode对linux、windows、macOS都是支持的
步骤4:
点击对应的系统后,输入远端设备的登录密码,然后就可以进入远端设备的home目录下了
在新弹出的vscode界面中打开你想编辑的文件夹:

接下来就和本地用vscode一样爽了^^
本文也适用于远程办公电脑,服务器等
边栏推荐
- FTP experiment and overview
- Simple use of psutil monitoring
- Take go language as an example to explain [performance analysis] by analogizing detective reasoning
- 踩坑electron渲染进程renderer,解决require is not defined的问题
- harbor部署
- Copy, paste and drag files between VMware virtual machine and host
- OSPF实验
- Learning diary - (routing and switching technology) DHCP (Dynamic Host Configuration Protocol)
- Single arm routing configuration instance learning record
- Unity3d HD rendering pipeline cannot play video on the model
猜你喜欢

DHCP configuration instance learning record

Solution rapide: xshell ne peut pas glisser dans un dossier ou un paquet

Unity3d: script execution sequence on scene loading gameobejct

HCIA----07 ACL-Net
![Build FRPC client in NAS [super brainless]](/img/02/bc150ab6cec73b9142d0e3c3532417.png)
Build FRPC client in NAS [super brainless]

Hcip - HDLC and PPP protocols

Super easy to use packet capturing tool tcpdump

ACL访问控制实验

VLAN configuration instance learning record

融e学答案脚本制作(2020最新)
随机推荐
NFS service deployment notes
tar、sftp、fin的、history命令,变量、别名
Leetcode problem solution summary
ACL access control experiment
helm安装rancher
App compilation and packaging deployment manual
Pod 拓扑约束
RHCSA--文件內容瀏覽、cut、uniq、sort、.tr命令使用
DHCP principle and configuration
Default routing configuration instance learning record
Build FRPC client in NAS [super brainless]
2020-09-20
FTP configuration instance learning record
Hcip ---- relevant knowledge points of GRE protocol, mGRE environment and OSPF Protocol
Telnet configuration instance learning record
Take go language as an example to explain [performance analysis] by analogizing detective reasoning
Unity3d HD rendering pipeline cannot play video on the model
Learning diary - (routing and switching technology) network address translation NAT Technology
HCIA----04 路由静态扩展、VLAN
平方根立方根