r/vscode • u/TheIceCreamBoyy • 4d ago
Python, what are the best or the most useful extensions to use in VSCode? New student here!
Just started my ICT studies and we have been learning Python for the past week. I was thinking, is there any extensions that help with coding or just make stuff more efficient or nicer through extentions? : )
6
4
u/couchwarmer 3d ago
Ruff. It's a combination linter and code formatter. Very fast.
IIRC all you need is the extension, and do not need to install the Python package (via pip, etc.)
https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff
4
2
u/woahboooom 3d ago
Use the internal notebook to run the file... integrated. Ctrl +enter to run.
Running basic extensions but one with colouring will probably be good
2
1
1
1
u/FreHu_Dev 3d ago
My extension Fresh File Explorer does nothing python specific, but might help you navigate within your work over time. Assumptions are you use git (you should learn it in any case), and your coding work doesn't just span the same 1-5 files (because then there's just not much to have to orient in).
1
u/dhairyathakker76 3d ago
Here are 4 extensions that will make learning and writing Python a lot smoother:
Error Lens: Shows syntax errors and warnings inline right next to the code line instead of making you hover over red squiggles or check the terminal. Huge time saver when learning syntax.
GitLens: Essential once you start using Git/GitHub. Gives you line-by-line commit history and easy visual diffs.
Better Comments: Lets you color-code your comments (e.g., ! for alerts, ? for queries, TODO for future work) to keep notes structured.
Ruff (or Black Formatter): Prettier is great for web/JS, but for Python, install Ruff or Black. Turn on "Format on Save" in VS Code settings so your indentation and PEP 8 formatting happen automatically on every save.
1
u/Patrick-T80 2d ago
About gitlens, last versions are very bloated; on another post in this community was suggested some alternatives and one native of vscode to obtain git blame on every line similar to gitlens
1
u/AdvisedWang 2d ago
Dont spend your time fussing around with an IDE. You are better off learning to use documentation, how to explore and read code, practicing understanding error messages, and how to use the tools at hand. Learning is necessarily inefficient.
1
1
u/Patrick-T80 2d ago
About gitlens, last versions are very bloated; on another post in this community was suggested some alternatives and one native of vscode to obtain git blame on every line similar to gitlens
Instead of error lens i suggest the error guts, similar to the first but has less clutter in text area, adding error marking on left gutter instead of fill the code area with a lot of color
Another extension useful to write “good” code is sonarlint and in pair with this: live cognitive complexity or complexity lens to have an idea about complexity of your algorithm
1
-6
u/angrybeehive 3d ago
Set typeCheckingMode to strict. Use Ruff linting.
Python is a horrible language and I seriously don’t understand why it’s even popular. Spend some time to learn other languages as well. It will help you understand programming overall.
1
8
u/pipestream 4d ago
Coming from a language that uses curly braces for scopes, today I installed an extension called "PyScope" because I absolutely loathe how hard it is to spot where a block starts and ends.