Best VS Code Extensions for Python Developers in 2026
The essential VS Code extensions Python devs actually use in 2026 — from Pylance to Ruff to AI assistants. Honest takes, real configs, no fluff.
Get more content like this on Telegram!
Daily AI tips, notes & resources — free
Best VS Code Extensions for Python Developers in 2026
You open a fresh Python project. No virtual environment set up yet, no linter configured. You type import pandas and nothing happens. No autocomplete, no type hints, no error squiggles. Just a blank editor that knows nothing about your code.
That's what Python development in VS Code feels like without the right extensions. With them, it's a completely different experience — one where the editor actually understands your code, catches type errors before you run anything, and formats files on save without you thinking about it.
The problem is that VS Code's extension marketplace has thousands of Python-related extensions, and a lot of them are outdated, redundant, or just not worth installing. This guide cuts through the noise. These are the extensions worth your time in 2026, based on what actually shows up in professional Python development workflows.
According to the 2025 Stack Overflow Developer Survey, VS Code remains the most-used editor across all developer categories at 73.6% adoption. Among Python developers specifically, it's even higher. The extension ecosystem is a big reason why.
The Core Stack: Extensions You Need Before Anything Else
1. Python + Pylance (Microsoft)
These two come as a bundle now, and you need both. The Python extension (ms-python.python) handles interpreter management, virtual environment detection, test running, and debugging. Pylance (ms-python.vscode-pylance) is the language server — it's what gives you completions, type checking, and import resolution.
Install them as one. Open the Extensions panel, search "Python", and install Microsoft's Python extension. Pylance comes along automatically.
Once installed, press Ctrl+Shift+P and run "Python: Select Interpreter" to point VS Code at your virtual environment. Everything else — linting, type hints, test discovery — flows from that interpreter selection.
The setting worth changing immediately:
{
"python.languageServer": "Pylance",
"pylance.typeCheckingMode": "basic"
}
basic mode catches the most common type errors without making Pylance scream at every untyped third-party library. If you're working on a typed codebase, bump it to standard. strict mode is for masochists writing fully annotated code — not worth it unless your whole team is on board.
2. Ruff (Astral Software)
Ruff (charliermarsh.ruff) is the linter and formatter that has largely replaced flake8, Black, isort, and pylint in one go. It's written in Rust. It's fast. It handles formatting, import sorting, and lint checks simultaneously.
The VS Code extension gives you:
- Red squiggles on lint violations in real time
- Format-on-save (replace your Black formatter config with this)
- Auto-fix for many violations on save
Here's the config that makes Ruff actually useful:
{
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.ruff": "explicit",
"source.organizeImports.ruff": "explicit"
}
}
}
And your pyproject.toml or ruff.toml to control which rules fire:
[tool.ruff]
line-length = 88
target-version = "py312"
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W", "UP"]
ignore = ["E501"] # line too long — handled by formatter
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
The UP ruleset (pyupgrade rules) is particularly useful — it automatically modernizes old Python patterns to newer equivalents, like replacing Union[str, int] with str | int.
The Debugging and Testing Stack
3. Python Debugger (Microsoft)
The ms-python.debugpy extension is now separate from the main Python extension but equally essential. It runs your code in a debug session where you can set breakpoints, inspect variables, and step through execution.
The most useful VS Code debugging keybindings that most developers never learn:
F5— Start debuggingF9— Toggle breakpoint on current lineF10— Step over (execute current line, move to next)F11— Step into (enter function being called)Shift+F11— Step out (finish current function, return to caller)Ctrl+Shift+F5— Restart debug session
For Django and Flask apps, add this to your .vscode/launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Django",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/manage.py",
"args": ["runserver", "--noreload"],
"django": true,
"justMyCode": true
},
{
"name": "FastAPI",
"type": "debugpy",
"request": "launch",
"module": "uvicorn",
"args": ["main:app", "--reload"],
"jinja": true,
"justMyCode": false
}
]
}
justMyCode: false is the change that makes debugging Django or FastAPI internals possible when you need to trace a bug through the framework itself.
4. Coverage Gutters
ryanluker.vscode-coverage-gutters reads your coverage XML output and shows green/red gutter indicators next to each line showing whether it's covered. No more switching to a browser to read coverage HTML reports.
Run pytest --cov=. --cov-report=xml to generate coverage.xml, then click "Watch" in the Coverage Gutters status bar. Lines covered go green. Lines not covered go red. Simple, effective, and it makes you feel appropriately guilty about that untested function you've been putting off.
The Workflow Accelerators
5. autoDocstring
njpwerner.autodocstring generates docstring templates when you type """ after a function definition. It reads your type annotations and parameter names to build the template automatically.
Change the format to Google style (widely used in Python projects):
{
"autoDocstring.docstringFormat": "google",
"autoDocstring.generateDocstringOnEnter": true
}
Type a function, press """ then Enter, and you get:
def calculate_discount(price: float, percentage: float) -> float:
"""Calculate the discounted price.
Args:
price (float): Original price before discount.
percentage (float): Discount percentage (0-100).
Returns:
float: Final price after applying the discount.
"""
It won't write the actual documentation for you (that's your job), but the structure appears instantly.
6. Python Indent
kevinrose.vsc-python-indent fixes VS Code's sometimes-wrong auto-indentation for Python. When you're writing nested list comprehensions, multi-line function calls, or complex dictionary literals, VS Code's default indentation can get confused. This extension makes indentation reliably correct.
It's a small thing, but it's one of those fixes that saves three seconds of frustration dozens of times per day.
7. Even Better TOML
tamasfe.even-better-toml for pyproject.toml editing. If you're using modern Python tooling — Ruff, Poetry, Hatch, PDM — your config lives in pyproject.toml. This extension gives you syntax highlighting, validation, and completions for the TOML format. Basic, but you notice its absence when it's not there.
The Jupyter and Data Science Stack
8. Jupyter (Microsoft)
ms-toolsai.jupyter brings full Jupyter notebook support into VS Code. You edit .ipynb files directly, run cells with Shift+Enter, see output inline, and get Pylance type checking inside cells.
The killer feature: Python files as notebooks. Create a .py file, add # %% comment markers, and VS Code treats each section as a cell you can run independently. This is the "percent script" format — you get the runnable cells of a notebook with the version control friendliness of a plain Python file.
# %% [markdown]
# ## Data Loading
# %%
import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv("data.csv")
df.head()
# %%
# Data cleaning
df = df.dropna()
df["date"] = pd.to_datetime(df["date"])
print(f"Cleaned dataset: {len(df)} rows")
Each # %% block runs independently. No .ipynb files needed. Git diffs are readable. It's the best of both worlds.
9. Data Wrangler
ms-toolsai.datawrangler is Microsoft's extension for exploring DataFrames visually. When you're in a Jupyter session and have a pandas DataFrame in memory, Data Wrangler opens it in a sortable, filterable table view. You can apply transformations visually and it generates the pandas code for you.
It's particularly useful when you're debugging why your DataFrame has unexpected null values or strange distributions. Being able to sort by a column and visually scan the outliers is faster than writing df[df['column'].isna()] repeatedly.
Workflow Diagram
The AI Assistant Tier
10. GitHub Copilot
github.copilot is the AI completion layer. At $10/month, it's worth it for professional Python work. The completions are good for standard patterns — Django models, SQLAlchemy queries, pandas transformations, pytest fixtures.
The features most devs don't use: Copilot Chat (Ctrl+Shift+I) lets you ask questions about your code in context. Select a function, open the chat, ask "explain what this does" or "add type annotations" — it works with your actual code rather than a generic context.
Keybindings worth knowing:
Tab— Accept completionAlt+]/Alt+[— Cycle through alternative completionsCtrl+Enter— Open Completions panel (shows multiple suggestions)Ctrl+Shift+I— Open Copilot Chat
One honest caveat: Copilot's Python completions are strongest for well-known libraries. For internal business logic with custom domain models, it guesses more than it knows. Don't trust completions blindly in your domain layer.
The "Actually Useful" Supporting Cast
GitLens (eamodio.gitlens): Inline git blame annotations that show who changed which line and when, with the commit message. Invaluable when you're debugging code you didn't write and need to understand why a decision was made.
Error Lens (usernamehw.errorlens): Shows Pylance and Ruff error messages inline next to the code, rather than just as red squiggles you have to hover to read. Faster feedback loop when fixing type errors.
Path IntelliSense (christian-kohler.path-intellisense): Autocompletes file system paths in your code. Useful when you're hardcoding file paths in scripts or referencing template files in Django/Flask.
REST Client (humao.rest-client): Write HTTP requests directly in .http files and execute them. Good for testing FastAPI or Django REST endpoints without switching to a separate API tool. Learn more about API testing approaches at Postman vs Bruno vs Insomnia comparison.
The Full settings.json Config
Here's a complete Python-optimized VS Code settings block:
{
"python.languageServer": "Pylance",
"pylance.typeCheckingMode": "basic",
"python.analysis.autoImportCompletions": true,
"python.analysis.inlayHints.functionReturnTypes": true,
"python.analysis.inlayHints.variableTypes": false,
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.formatOnSave": true,
"editor.rulers": [88],
"editor.codeActionsOnSave": {
"source.fixAll.ruff": "explicit",
"source.organizeImports.ruff": "explicit"
}
},
"python.testing.pytestEnabled": true,
"python.testing.pytestArgs": ["-v", "--tb=short"],
"autoDocstring.docstringFormat": "google",
"jupyter.askForKernelRestart": false,
"jupyter.interactiveWindowMode": "perFile"
}
The inlayHints.functionReturnTypes setting shows inferred return types as ghost text next to function definitions. It makes implicit return types visible without requiring explicit annotations, which is useful when you're reading unfamiliar code.
What to Skip
Kite: Shut down in 2022. Still occasionally appears in tutorials. Ignore.
Visual Studio IntelliCode: Redundant if you have Copilot. Adds ML-based ranking to completions, but Copilot subsumes this entirely.
Python Preview: Interesting idea, but not maintained. Don't install it.
Bracket Pair Colorizer: Built into VS Code natively now. Don't install the extension — enable it with "editor.bracketPairColorization.enabled": true in settings.
Putting It Together
The minimum viable Python setup in VS Code: Python + Pylance + Ruff. Those three give you type checking, linting, and formatting in a package that basically runs itself.
From there, add debugpy for actual debugging work, Coverage Gutters if you write tests, and Jupyter if you do any data work. Copilot is worth the subscription if this is your job.
The full list doesn't need to be installed at once. Start with the core stack, see what friction remains in your workflow, and add extensions that address specific pain points. An extension solving a real problem is worth ten extensions you installed because a tutorial told you to.
For more on Python development workflows, check out the Python development courses or browse the Python development section for tutorials on specific frameworks and tools.
💬 DiscussionPowered by GitHub Discussions
Frequently Asked Questions
AiTechWorlds Team
✓ Verified WriterThe AiTechWorlds team is passionate about AI, technology, and education. We create high-quality, research-backed content to help you learn, grow, and succeed in the modern digital world.
Related Articles
AI Code Editors Compared: Cursor vs Windsurf vs GitHub Copilot 2026
Deep comparison of Cursor, Windsurf, and GitHub Copilot in 2026. Honest takes on autocomplete, agent modes, pricing, and which editor actually makes you faster.
AI Meeting Software: 10 Tools That Transcribe and Summarize Meetings
Tested: 10 AI meeting tools that transcribe, summarize, and extract action items in 2026. Real accuracy numbers, honest frustrations, and who each tool is actually built for.
AI Video Software Review: Top 8 Tools for Creating Videos with AI
Tested: the top 8 AI video creation tools of 2026. Honest reviews of Sora, Runway, Synthesia, HeyGen, and more — with real pricing and what each tool actually gets wrong.
Best AI Design Software 2026: Tools for Designers and Creators
Tested 9 AI design tools in real projects: Canva AI, Adobe Firefly, Midjourney, Figma AI, and more. Here's what's worth your money and what overpromises.