Python With Visual Studio Code – A 5 Step Guide
来源:互联网 发布:windows ce 6.0 编辑:程序博客网 时间:2024/06/05 14:45
I am a student of Python and I will try to present a step by step guide about ‘How To Use Python With Visual Studio Code?’. I will be listing down the steps I found and followed to setup Visual Studio Code to debug and run python code. If you think I missed something please do let me know in the comments section.
Step 1: Install Python
It sounds very obvious to many but, for those who are new to Python as well as Visual Studio Code I would like to inform you that Visual Studio Code can be used to debug and run Python code. But, ‘Visual Studio Code doesn’t come with Python‘. So, we will have to install python separately. Please use this official Python download link to get the latest Python. (There is big debate whether to use Python 2.x or 3.x? I don’t want to get into it for now. Just use the latest version of Python. That’s what sane people say!). Python installation is very simple i.e. Double click!
Tips :
- I prefer to use custom path for Python installation e.g. “C:\Python\” because the default path C:\Users\<user name>\AppData etc. etc. is not easy to find on the machine.
- If you are new to Python do not touch other default options.
- Python 3.6+ has a new option at the end that can disable MAX_PATH limit. Disable that limitation. It’s good.
Step 2 : Install Visual Studio Code
Now another (obviously) important step is to install Visual Studio Code. Visual Studio Code is a Microsft’s free Code editor. You can visit it’s official website for further details. But, in short it is Visual Studio without any compiler. It’s only a code editor. Users have to install plugins in order to perform certain tasks which are particular to the programming language. Visit it’s official download page, download the latest version and install. You can choose 64x or 32x as per your choice.
Tip: You can choose to select auto installation for supporting tools for Python from Welcome page. (Please see at top right of the Welcome page) Or you can install the extensions Individually as I will mention in Step 3 below.
Step 3: Install Extensions For Python
Click on the Square button on left button panel. It is is the ‘Extensions Button’. Natural question is ‘Why do we need extensions?’ Answer is simple, ‘Because Visual Studio Code is just a Code Editor and is not built to compile any code as such. So, to help coupling the compiler and Visual Studio Code, we need Extensions’
Please install the following Extensions as shown in the picture below. (Use search box at the top for finding these Extensions). These extensions are more than sufficient to debug and run a Python code
- Python
- Python for VSCode
- MagicPython
- Python Extended
- Python With Visual Studio Code – A 5 Step Guide
- Code Review with Gerrit, a mostly visual guide
- Mastering Debugging in Visual Studio 2010 - A Beginner's Guide Step by Step
- Build an RFC Server with NCo 3.0 – A Step-By-Step Guide
- A step-by-step guide for debugging native code (Sequoyah/ndk guide)
- Getting Started with Rational XDE Professional: A Guide for Visual Studio .NET Developers
- React with Visual Studio Code and Webpack
- Modeling Structured Finance Cash Flows with Microsoft Excel: A Step-by-Step Guide
- Visual Studio Code进行Python开发
- visual studio code的python配置
- Visual Studio Code debug Python 代码很牛逼。
- Visual Studio Code + python 开发环境搭建
- Visual Studio Code的python设置
- Creating a Web Site with Flash: Visual QuickProject Guide
- Building a Web Site with Ajax: Visual QuickProject Guide
- Compiling a MEX file with Visual Studio
- Mastering Debugging in Visual Studio 2010 - A Beginner's Guide
- A Guide To MSDN Integration (Visual Studio 6.0)
- 2017CCPC秦皇岛G ZOJ 3987Numbers(大数+贪心)
- mysql之常用函数集锦
- linux中的定时延时任务
- Action中使用Servlet对象
- Fastjson 自定义 json 的 值输出格式
- Python With Visual Studio Code – A 5 Step Guide
- 函数的定义
- 646. Maximum Length of Pair Chain(动态规划 vs 贪心)
- 【NOIP2017提高A组冲刺11.1】总结
- framebuffer简介与应用
- poj 3661(区间dp)
- 【单调队列】BZOJ1047(HAOI2007)[理想的正方形]题解
- 基于javaMail发送邮件的实现
- ios MBProgressHud 自定义背景 背景色 标题颜色