i'm starting python on vscode, wich extensions would you recomend to me?
How To Make A VS Code Extension In Python - Stack Overflow
visual studio code - How to install previous version of Python extension for VSCode - Stack Overflow
I made my first vscode extension in 3 hours, to manage my Python dependencies with Poetry
Videos
Hi everyone, can you share some of the VS Code extensions you use to improve your coding experience? I know the most common extensions, like Prettier, BetterComments and SpellChecker, but I'm sure there are some hidden gems out there, hope you can help me find some! Thank you all
VS Code is built on Electron framework which run with Node.js, so it's impossible to make a extension "directly" using Python. However you can use these two ways to keep your stuff mainly in Python:
- Node.js allows you to call outside scripts using
child_process. it is often used to achieve multi-threading in Node.js. - If you are developing a language extension, you should give Language Server with LSP a try. By doing this you can start up a server written by Python and communicate with VSC JS client using LSP.
Note that both ways requires you to write some JS/TS code.
VS Code has official documentation on using the Langugage Server/LSP to create a python extension: https://code.visualstudio.com/api/advanced-topics/python-extension-template
If you prefer to use the child_process approach, there is an unofficial python wrapper: https://github.com/CodeWithSwastik/vscode-ext?u=t&m=o#example-extension
You need to install it from a .vsix file. You can find them here.
Download the .vsix file of the version you want. You may have to click assets to see them.
Then open VSCode, go to extensions -> click on the three dots -> install from vsix and select your file.
To install the .vsix you can also use the command
code --install-extension ms-python-release.vsix

sources :
- How can I install Visual Studio Code extensions offline?
- https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix
This can be done using "Install Another Version" option available with VS Code extension store.
- Go to extensions.
- Click on Gear Icon for the installed extension
- Click on Install Another Version
- And select the version you wish to install
