Visual Studio Code (VSCODE) is a free and powerful source code editor that facilitates writing and execute the Python code. This guide will guide it through the VSCODE configuration for the development of Python, step by step.
Previous requirements
Before starting, be sure to have:
- Python installed on your computer
- An Internet connection
- Basic familiarity with the operating system of your computer
Step 1: Download and install the Visual Studio Code
Windows, Macos and Linux
- Go to the official VSCODE website: https://code.visualstudio.com/
- Click the “Download” button for your operating system
- Execute the installer and follow the installation instructions
- Start vscode after installation
Step 2: Install the Python extension
- Open vScode
- Click on the Extensions View icon in the Left sidebar (or press CTRL+SHIFT+x)
- Search “python” in the extension market
- Look for the official Microsoft Python extension
- Click “Install”

Step 3: Configure the Python interpreter
- Open the command palette (ctrl+shift+p or cmd+shift+p in macOS)
- Write “Python: Select Interpreter”
- Choose the Python version you want to use
- If you do not see your Python installation, you may have to add it to the route of your system


Step 4: Create your first Python project
- Create a new folder for your project
- Open the vscode folder (file> open folder)
- Create a new file with an .py extension (for example, hello.py)
- Write your first python code:

Step 5: Execute the python code
Method 1: Use of the Execute button
- Open your python file
- Click the “Run” Triangle button in the upper right corner of the editor
- See the exit at the Integrated Terminal


Method 2: Using the Integrated Terminal
- Open the integrated terminal (see> terminal or ctrl+`)
- Execute your script writing:

Step 6: Python purification code
- Establish an interruption point by clicking on the red point on the gutter (left of the line numbers)
- Go to execution (Ctrl+Shift+D)
- Click “Execute and purify”
- Select the “python file” configuration
- The treatment plant will stop at its interruption point, which will allow you to inspect variables




Recommended vscode configuration for python
Code format
- Install the “Black Formatro” extension
- Open the VSCODE configuration (file> preferences> configuration)
- Look for “Save Format”
- Verify the option “Save” format

Fluff
- Python extension includes Pylint by default
- Configure fluff rules in the configuration to improve the quality of the code
Useful extensions for Python development
- Pylance: Improved Language Support
- Python Document Generator
- Intellicode: development assisted by ai–ai
- GITLENS: GIT INTEGRATION
Common problem problem solution
Python not recognized
- Make sure Python is installed correctly
- Add Python to your system route
- Restart vscode after installation
Extension does not work
- RECHARGE VSCODE
- Reinstall the Python extension
- Check the configuration of your Python interpreter
Python productive development tips
- Use virtual environments
- Learn keyboard shortcuts
- Explore Intellisense for the end of the code
- Use git for version control
Conclusion
In this tutorial, we explore how to configure VSCODE for the development of Python from scratch. We start by installing VSCODE and the Python extension, selecting the appropriate Python interpreter and creating our first Python script. We learned how to execute and purify the Python code using both the execute button and the integrated terminal, and we saw how the interruption and treatment points help identify problems in our code. The guide also covered the recommended configuration, such as the code format with black, fluff with Pylint, and introduced useful extensions such as Pylance and Gitlens. Finally, we address common configuration problems and shared productivity tips, such as using virtual environments and mastering keyboard shortcuts. At the end of this guide, you must feel comfortable using VSCODE as a powerful and flexible environment for Python programming.

Nikhil is an internal consultant at Marktechpost. He is looking for a double degree integrated into materials at the Indian Institute of technology, Kharagpur. Nikhil is an ai/ML enthusiast who is always investigating applications in fields such as biomaterials and biomedical sciences. With a solid experience in material science, it is exploring new advances and creating opportunities to contribute.