Skip to main content

VSCode使用

VSCode使用1、VSCode下载2、VSCode安装2.1、打开安装包2.2、同意协议2.3、安装位置2.4、安装选项2.5、完成安装3、VSCode使用3.1、基础使用3.2、拓展使用3.2.1、基础拓展PythonC/C++Material Icon Theme3.2.2、Remote-SSHssh安装ssh使用

教程演示Windows平台安装VSCode和SSH远程步骤。

用户可以根据这个方法远程树莓派、Jetson等主板

1、VSCode下载

官网网址:https://code.visualstudio.com/

image-20241229141638179

image-20241229141703922

2、VSCode安装

2.1、打开安装包

以管理员身份打开VSCodeUserSetup-x64-xxx.exe

image-20241229141818112

2.2、同意协议

image-20241229142216475

2.3、安装位置

建议选择软件默认的安装位置:

image-20241229142324425

2.4、安装选项

image-20241229142425202

image-20241229142459323

image-20241229142550001

2.5、完成安装

image-20241229142633937

3、VSCode使用

3.1、基础使用

双击“Visual Studio Code”图标打开应用:

image-20241229142704122

image-20241229142818516

3.2、拓展使用

3.2.1、基础拓展

Python

拓展搜索栏搜索“python” ,选择Python进行安装:

image-20250103224402098

C/C++

拓展搜索栏搜索“c/c++” ,选择C/C++、C/C++ Extension Pack进行安装:

image-20250103224833396

Material Icon Theme

拓展搜索栏搜索“material icon theme” ,选择Material Icon Theme进行安装:

image-20250103225155546

image-20250103225255205

3.2.2、Remote-SSH

ssh安装

拓展搜索栏搜索“ssh” ,选择Remote-SSH进行安装:

image-20250103214934768

ssh使用

Remote-SSH安装完成后,可以直接通过左侧状态栏进行使用!

xxxxxxxxxx 不同的用户可能配置文件中的路径用户名不一致,并没有任何印象

配置远程:修改配置文件

image-20250103215854788

配置远程:修改配置文件

填写需要远程的设备信息,被远程的设备需要配置好SSH服务并且支持SSH远程;填写后使用Ctrl+S快捷键保存,左侧会自动添加对应的SSH远程设备。

xxxxxxxxxx # Read more about SSH config files: https://linux.die.net/man/5/ssh_config Host MyComputer # 远程设备别名 HostName 192.168.66.152 # 远程设备IP User GO # 远程设备用户名

image-20250103221210749

远程

选择远程设备进行SSH远程:

image-20250103221608414

选择被远程设备平台:根据实际平台填写

image-20250103221642634

image-20250103222730231

填写密码:填写密码后回车确认

image-20250103222811721

远程使用

远程成功后,左下角有提示;我们可以通过VSCode打开被远程设备的文件夹

image-20250103223006694

image-20250103223939977

再次输入密码:

image-20250103224011715

image-20250103225421540