A Visual Studio Code extension with rich support for the Python language (including Python 3.6), with features including the following and more:
- Linting (Prospector, Pylint, pycodestyle, Flake8, pylama, pydocstyle, mypy with config files and plugins)
- Intellisense (autocompletion with support for PEP 484 and PEP 526)
- Auto indenting
- Code formatting (autopep8, yapf, with config files)
- Code refactoring (Rename, Extract Variable, Extract Method,Sort Imports)
- Viewing references, code navigation, view signature
- Excellent debugging support (remote debugging over SSH, mutliple threads, django, flask)
- Running and debugging Unit tests (unittest, pytest, nose, with config files)
- Execute file or code in a python terminal
- Local help file (offline documentation)
- Snippets
- Install the extension
- optionally install
ctags
for Workspace Symbols, from here, or usingbrew install ctags
on macOS - Select your Python interpreter
- If it's already in your path then you're set
- Otherwise, to select a different Python Interpreter/Version (or use a virtual environment), use the command
Select Workspace Interpreter
)
For further information and details continue through to the documentation.
- If you come across a problem with the extension please file an issue
- Contributions are always welcome! Please see our contributing guide for more details
- Any and all feedback is appreciated and welcome!
- If someone has already file an issue that encompasses your feedback, please leave a 👍/👎 reaction on the issue
- Othewise please file a new issue
- IDE-like Features
- Automatic indenting
- Code navigation ("Go to", "Find all" references)
- Code definition (Peek and hover definition, View signatures)
- Rename refactoring
- Sorting import statements (use the
Python: Sort Imports
command)
- Intellisense and Autocomplete (including PEP 484 support)
- Ability to include custom module paths (e.g. include paths for libraries like Google App Engine, etc.; use the setting
python.autoComplete.extraPaths = []
)
- Ability to include custom module paths (e.g. include paths for libraries like Google App Engine, etc.; use the setting
- Code formatting
- Linting
- Support for multiple linters with custom settings (default is Pylint, but Prospector, pycodestyle, Flake8, pylama, pydocstyle, and mypy are also supported)
- Debugging
- Watch window
- Evaluate Expressions
- Step through code ("Step in", "Step out", "Continue")
- Add/remove break points
- Local variables and arguments
- Multi-threaded applications
- Web applications (such as Flask & Django, with template debugging)
- Expanding values (viewing children, properties, etc)
- Conditional break points
- Remote debugging (over SSH)
- Google App Engine
- Debugging in the integrated or external terminal window
- Debugging as sudo
- Unit Testing
- Snippets
- Miscellaneous
- Running a file or selected text in python terminal
- Refactoring
- Rename Refactorings
- Extract Variable Refactorings
- Extract Method Refactorings
- Sort Imports
The Microsoft Python Extension for Visual Studio Code collects usage
data and sends it to Microsoft to help improve our products and
services. Read our
privacy statement to
learn more. This extension respects the telemetry.enableTelemetry
setting which you can learn more about at
https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting.