Python With Visual Studio Code – A 5 Step Guide
2017-11-02 20:28
288 查看
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.
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.
Python Installation
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.
Visual Studio Code Welcome Page
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.
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 Extensions for Visual Studio Code
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 comewith 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.
Python Installation
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.
Visual Studio Code Welcome Page
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 helpcoupling 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 Extensions for Visual Studio Code
相关文章推荐
- Code Review with Gerrit, a mostly visual guide
- ubuntu 安装 Visual studio code (c/c++ python php ...)
- error: Python was built with Visual Studio 2003
- visual studio code 里调试运行 Python代码
- Visual Studio Code搭建python开发环境
- 基于Visual Studio Code搭建Python开发环境
- (OK) Spend Leap Day with TACO + VS Code (visual studio code) - Cordova
- React with Visual Studio Code and Webpack
- error: Python was built with Visual Studio 2003
- Visual Studio Code 1.0.1 for python
- Step by Step Setup Git Server on Windows with CopSSH + msysGit and Integrate Git with Visual Studio
- Visual Studio Code进行Python开发
- Step by Step Setup Git Server on Windows with CopSSH + msysGit and Integrate Git with Visual Studio
- 初试Visual Studio Code配置Python开发环境
- MAC OSX安装Python环境 + Visual Studio Code
- Visual Studio Code的python设置
- Visual Studio Code搭建python开发环境
- 在ubuntu下使用visual studio code编写python
- How to debug test code on Windows Mobile Emulator with Visual Studio