本文介绍VSCode 简单配置Python开发环境方法。
目录
1 Visual Studio Code 下载安装
Visual Studio Code下载地址: https://code.visualstudio.com/Download
安装:
2 设置 Python 环境
Ctrl+Shift+P
输入>python select Interpreter
会列出系统所有python解释器,选择对应的解释器:
3 插件安装
3.1 安装code runner插件
3.1.2 配置code runner
运行代码方式:
- 键盘快捷键 Ctrl+Alt+N
- 快捷键 Ctrl+Shift+P调出 命令面板, 然后输入 Run Code
- 在编辑区,右键选择 Run Code
- 在左侧的文件管理器,右键选择 Run Code
- 右上角的运行小三角按钮
停止代码运行:
- 键盘快捷键 Ctrl+Alt+M
- 快捷键 Ctrl+Shift+P调出 命令面板, 然后输入 Stop Code Run
- 在Output Channel,右键选择 Stop Code Run