avatarJIN

Summary

The article outlines 22 essential Microsoft Visual Studio Code (VSCode) extensions that enhance Python development productivity.

Abstract

The article on the undefined website emphasizes the importance of VSCode extensions for Python developers, detailing 22 top extensions. It begins by acknowledging VSCode's popularity among front-end developers and its support for Python through the core Python extension, which provides features like IntelliSense, linting, code formatting, debugging, testing, Jupyter Notebook integration, and environment management. The list includes extensions like LiveCode for real-time code evaluation, Python Snippets for quick code templates, and Python Preview for debugging visualization. Tools like Sort Lines and Git Graph offer organizational and version control enhancements, while Python Indent and Python Test Explorer improve code formatting and test management, respectively. Sourcery and Mintlify AI Doc Writer assist in code refactoring and documentation. Thunder Client and AREPL for Python enable API testing and real-time code evaluation. Sourcegraph and Visual Studio IntelliCode extend search and intelligent code completion capabilities. GistPad and CodeSnap facilitate code sharing and documentation. Krinql offers AI-powered coding assistance, and Wolf provides a WYSIWYG experience in the Python interpreter. The article concludes with a call to support the author through Patreon, Ko-fi, or Buymeacoffee, and invites readers to join Medium using the author's referral link.

Opinions

  • The author believes that the combination of GitHub and VSCode is indispensable for most front-end developers/programmers.
  • The Python extensions for VSCode are considered crucial for improving the productivity of Python developers.
  • LiveCode is praised for making it easier to debug Python code by providing real-time evaluation and variable display.
  • Python Snippets is recommended for its ability to quickly generate code patterns without the need for external searches.
  • Python Preview is highlighted for its support in visualizing code results in real-time and its customizable theme skins for VSCode.
  • Sort Lines is noted for its straightforward alphabetical sorting capabilities.
  • Git Graph is favored for its visual appeal and control over the UI when interacting with Git.
  • Python Indent is recognized for solving issues related to automatic indentation in Python code.
  • Python Test Explorer for Visual Studio Code is commended for its support for various test frameworks and convenient bug reporting.
  • Sourcery is endorsed for its ability to automatically refactor code and improve code quality without manual intervention.
  • Bookmarks is appreciated for its functionality in marking and navigating through code positions efficiently.
  • Thunder Client is valued as a lightweight Rest API client that integrates with VSCode.
  • Docs View is acknowledged for its automatic documentation display and support for multiple languages with syntax highlighting.
  • Sourcegraph is recommended for its fast, cross-repository navigation and code intelligence features.
  • Pylance is highlighted for its advanced features like docstrings, signature help, code completion, and more.
  • Mintlify AI Doc Writer is seen as a useful tool for automatically generating comments for method documentation.
  • Krinql is noted for its AI-powered assistance in understanding and using libraries within VSCode.
  • GistPad is recognized for its ability to edit GitHub Gists and repositories directly within VSCode.
  • CodeSnap is appreciated for its quick screenshot saving and sharing functionality.
  • Visual Studio IntelliCode is praised for providing AI-assisted IntelliSense and intelligent code completion.
  • AREPL for Python is endorsed for its real-time code evaluation and variable display features.
  • Wolf is highlighted for offering a WYSIWYG experience in the Python interpreter within VSCode.
  • The author suggests that readers can support their work through various platforms and invites new Medium members to use their referral link.
Photo by Justin Morgan on Unsplash

The Best 22 Microsoft Visual Studio Code Extensions for Python Development to Increase Your Productivity

Coupled with the combination of GitHub and VSCode, Visual Studio Code (VSCode) is indispensable for most front-end developers/programmers. As a code editor, VSCode is a free open source software, that has many extensions to improve development efficiency.

Today I share very useful VSCode extensions for Python that allow you to increase your productivity.

  1. Python
https://marketplace.visualstudio.com/items?itemName=ms-python.python

VSCode supports highlighting Python code even without the Python extensions. However, if you want to use code in Python, you must install it to improve the productivity of Python developers, so that the developers can open the .py file. There are several features:

A. IntelliSense: Edit your code with auto-completion, code navigation, syntax checking, and more

B. Linting: Use Pylint, Flake8, etc. for addition code analysis or inspection

C. Code Formatting: Use black, autopep, or YAPF to format your code

D. Debugging: Debug your Python Scripts, web apps, remote or multi-threaded processes

E. Testing: Run and debug tests through the Test Explorer with Unittest or Pytest

F. Jupyter Notebooks: Create and edit Jupyter Notebooks, add and run code cells, render plots, visualize variables through the variable browser, visualize data frames with the data viewer, and more

G. Environments: Automatically activate and switch between virtualenv, venv pipenv, conda, pyenv environments

H. Refactoring: Restructure your Python code with variable extraction, method extraction, and import sorting

2. LiveCode

It is easier for you to debug Python code

A. Real-time Evaluation: You don’t need to run your python file, just keep typing

B. Variable display: Whenever a variable is declared or changed, its new value is displayed in the same line

C. Loop display: For each iteration of a loop all intermediate values are displayed

D. Error display: The instant you make a mistake an error with the stack trace is shown

3. Python Snippets

https://marketplace.visualstudio.com/items?itemName=cstrap.python-snippets

It contains many code snippets such as strings, lists, sets, tuples, dictionaries, classes, conditional statements, loops and etc. Those are templates that make it easier to enter commands to generate the repeating code patterns, and then fine-tune to complete the function development. Also, this tool can provide you with a sample code for reference, and do not go to the search engine to search for example.

4. Python Preview

https://marketplace.visualstudio.com/items?itemName=dongli.python-preview

It supports the debugging preview for the Python language. It means that you can visualize the results of your code in real-time. You can switch various theme skins for VSCode.

https://github.com/dongli0x00/python-preview

5. Sort Lines

https://marketplace.visualstudio.com/items?itemName=Tyriar.sort-lines

It gives you alphabetical sorting.

https://marketplace.visualstudio.com/items?itemName=Tyriar.sort-lines

6. Git Graph

https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph

It is the most visually appealing plugin for interacting with Git in VSCode. When performing complex git operations, it is useful to see a well-defined commit tree, which is very customizable and provides developers control over the UI such as graphical styles and branch colors. Through this plugin, you can clearly see the commit records, the details of file changes, changes of the current branch, uncommitted changes, and many customizable extension settings, create operations through buttons, and even perform code reviews without leaving the IDE.

7. Python Indent

https://marketplace.visualstudio.com/items?itemName=KevinRose.vsc-python-indent

When the preference “Auto Indent” is checked, the newline cursor will automatically tab when there is a colon. When returning, the new line will also automatically remove a tab. But other than these 2 cases, if you roll back a tab and then change the line, it will automatically make a tab. This extension has solved this problem perfectly.

8. Python Test Explorer for Visual Studio Code

https://marketplace.visualstudio.com/items?itemName=LittleFoxTeam.vscode-python-test-adapter

A. Display the test explorer in the text view in the sidebar with all detected tests and suites and their state

B. Support for Unittest, Pytest, and Testplan test frameworks and their plugins

C. Support multi-root workspaces

D. Convenient bug reporting during test discovery

9. Python Type Hint

https://marketplace.visualstudio.com/items?itemName=njqdev.vscode-python-typehint
  • Provide type-hint autocompletion for built-in types, classes, and typing modules.
  • Estimate the correct type and provide completion
  • Python files can be searched in the workspace for type estimation purposes

10. Sourcery

https://marketplace.visualstudio.com/items?itemName=sourcery.sourcery

Sourcery is a VScode extension to help you improve your Python code. It automatically reviews and gives instant suggestions to refactors your code so you can spend more time focusing on writing new code and less time cleaning up. It makes all of your Python code cleaner and more readable. There are some features to help your code:

11. Bookmarks

https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks
  • Mark/unmark positions in your code and give them a name
  • Add virtual workspace support
  • Improved usability of the sidebar
  • Add cross-platform support
  • See a list of all bookmarks in one file and the project
  • Jump forward and backward between bookmarks

12. Thunder Client

https://marketplace.visualstudio.com/items?itemName=rangav.vscode-thunder-client

It is a lightweight Rest API client.

13. Docs View

https://marketplace.visualstudio.com/items?itemName=bierner.docs-view

A. Displays documentation automatically in the sidebar or pannel

B. Support for any langugaes

C. Support syntax highlighting and markdown rendering

14. Sourcegraph

https://marketplace.visualstudio.com/items?itemName=sourcegraph.sourcegraph

It allows you to find and fix things fast across all your code. Also, you can search millions of open-source repositories for free directly from the VSCode IDE. Learn from helpful code examples, and reuse code from millions of repositories in the open-source libraries. You can signup for a free Sourcegraph cloud account so that you can synchronize your private and public repositories and search all your code in a single view in VSCode. It also provides fast, cross-repository navigation with “Go to Definition” and “Find References” features to quickly understand new code and find answers in codebases of any size.

15. Pylance

https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance

A. Docstrings

B. Signature help with type information

C. Provide Code completion

D. Auto-imports

E. Parameter suggestions

F. Navigate all your code

F. IntelliCode compatibility

16. Mintlify AI Doc Writer

https://github.com/mintlify/vscode-docs/raw/HEAD/assets/demo-docs.gif

Just select the function code, and then press a shortcut key to automatically generate a comment for the method which can be used for function documentation.

17. Krinql

https://marketplace.visualstudio.com/items?itemName=krinql.krinql-vscode

If you don’t understand the code, Krinql can answer or let it write the docstring. Also, it can find how to use the library and automate it in the VSCode editor itself.

18. GistPad

https://marketplace.visualstudio.com/items?itemName=vsls-contrib.gistfs

It lets you edit GitHub GIsts and repositories directly in VSCode.

19. CodeSnap

https://marketplace.visualstudio.com/items?itemName=adpyke.codesnap

A. Quickly save screenshots of your code

B. Copy screenshots to your clipboard

20. Visual Studio IntelliCode

It provides AI-assisted IntelliSense by showing recommended completion items for your code context.

21. AREPL for python

https://marketplace.visualstudio.com/items?itemName=almenon.arepl

A. Real-Time Evaluation: AREPL evaluates your code automatically

B. Variable Display: The final state of your local variables is displayed in a collapsible JSON format

C. Error Display: The mistake you make

D. Settings: AREPL offers many settings to fit your user experience.

22. Wolf

https://marketplace.visualstudio.com/items?itemName=traBpUkciP.wolf

You can experience the WYSIWYG (What You See Is What You Get) in the Python interpreter in VSCode.

References

If you’ve found any of my articles helpful or useful then please consider throwing a coffee my way to help support my work or give me patronage😊, by using

Patreon

Ko-fi.com

buymeacoffee

Last but not least, if you are not a Medium Member yet and plan to become one, I kindly ask you to do so using the following link. I will receive a portion of your membership fee at no additional cost to you.

Visual Studio
Extension
Plugins
Development
Python
Recommended from ReadMedium