一、概述
VSCode(全称:Visual Studio Code)是一款由微软开发且跨平台的免费源代码编辑器。该软件支持语法高亮、代码自动补全(又称 IntelliSense)、代码重构、查看定义功能,并且内置了命令行工具和 Git 版本控制系统。用户可以更改主题和键盘快捷方式实现个性化设置,也可以通过内置的扩展程序商店安装扩展以拓展软件功能。
VS Code 使用 Monaco Editor 作为其底层的代码编辑器。
在 2019 年的 Stack Overflow 组织的开发者调查中,Visual Studio Code 被认为是最受开发者欢迎的开发环境。
Visual Studio Code 默认支持非常多的编程语言,包括 JavaScript、TypeScript、CSS 和 HTML;也可以通过下载扩展支持 Python、C/C++、Java 和 Go 在内的其他语言。支持功能包括语法高亮、括号补全、代码折叠和代码片段;对于部分语言,可以使用 IntelliSense。Visual Studio Code 也支持调试 Node.js 程序。和 GitHub 的 Atom一样,Visual Studio Code 也基于 Electron 框架构建。
Visual Studio Code 支持同时打开多个目录,并将信息保存在工作区中以便复用。
作为跨平台的编辑器,Visual Studio Code 允许用户更改文件的代码页、换行符和编程语言。
二、官网
https://code.visualstudio.com/

三、Download


四、Window 安装 VScode
1、确定

2、同意协议 -> 下一步

3、创建快捷方式 -> 下一步

4、安装

5、耐性等待

6、ok

五、Linux 安装 VScode
1、解压
[alex@hadoop102 software]$ tar -xzvf code-stable-x64-1646928009.tar.gz -C ../module/
2、执行
[alex@hadoop102 software]$ cd ../module/VSCode-linux-x64/
[alex@hadoop102 VSCode-linux-x64]$ ./code --user-data-dir=~/.vscode --no-sandbox
3、启动界面

4、创建桌面图标
[alex@hadoop102 ~]$ cd ~/Desktop/
[alex@hadoop102 Desktop]$ touch VScode.desktop
[alex@hadoop102 Desktop]$ chmod 755 VScode.desktop
[alex@hadoop102 Desktop]$ vim VScode.desktop
[Desktop Entry]
Name = VScode
Exec = /opt/module/VSCode-linux-x64/code --user-data-dir=~/.vscode --no-sandbox
Icon = /opt/module/VSCode-linux-x64/resources/app/resources/linux/code.png
Type = Application
六、VScode安装 python插件
1、搜索插件

2、安装插件

七、VScode 设置 python 解析器
1、右键选择Command Palette…命令面板

2、python: select Interpreter

3、选择想使用的python解析器

八、运行代码
1、方式一

2、方式二 Ctrl + ~

3、方式三
如果已经配置好环境直接按F5
4、方式四
安装code runner 插件 然后右键点击runcode 就可以了

