While working through the VS Code tutorial on Flask, I noticed some difficulties that took more time to fix than they should have. Some problems came from the Python extension while others where my lack of understanding of VS Code. In the meantime, I found solutions for those problems that I like to share.
This post is part of my journey to learn Python. You can find the other parts of this series here.
Error in the Python extension
The Python extension I installed had a few bugs that made it impossible to follow the tutorial. Neither could I use my virtual environment nor did the debugger work. There are many releases for the Python extension and sometimes they ship bugs. If you do not want to wait a few days to get the bugfixes, you can try to install an older version.
Go to the Extension Marketplace, click on the settings-gear icon and select “Install Another Version…”:
Documentation for VS Code & Python
VS Code is a powerful tool with many helpful features. If you know where they are you can save a lot of time. The best way to learn the most important parts is to read the official documentation for VS Code and Python:
- Getting Started with Python in VS Code
- Python settings reference
- Linting
- Debugging
- Environments
- Testing
Tutorials using VS Code
An alternative way to learn VS Code is to follow along a tutorial that explains a (Python) framework using VS Code. Microsoft curated these tutorials in a way that you can make progress in both directions:
Conclusion
I am more and more excited about the many possibilities VS Code offers If something doesn’t work, you can quickly find help and solve the problems. However, do not underestimate the learning effort – VS Code is a full-fledged development environment and with that comes a lot you need to know.
1 thought on “Python Friday #25: Helpful Resources for VS Code and Python”