Is Thonny or Visual Studio Code better for Raspberry Pi users?
Both Thonny and Visual Studio Code are built into Raspberry Pi OS. Both are capable of running Python scripts and are useful when you want to get things working using the Raspberry Pi. But there can only be one IDE for Pi users, and this guide will help you choose which one to use!
Advantages and disadvantages of Thonny
Thonny is an open source platform dedicated to Python and only Python. It's an IDE for beginners, mainly because of its easy-to-use GUI.
As soon as you start Thonny, you can basically just type what you want and save it as if you were using Windows Notepad.
Advantages of Thonny
- Starts up easily – Thonny opens quite quickly. Immediately after that, you can enter the code into the new 'Untitled' file . This makes it great for writing code quickly.
- Has all the basic Python tools – You don't need to open a new tab or install additional software for Thonny to run Python. It is immediately usable.
- No need to learn - It's easy to find where you can run, pause, and stop Python scripts. Plus, the Shell is quite visible at the bottom.
Disadvantages of Thonny
- No support outside of Python – While it's certainly possible to use it as something like Notepad to write code in other languages, it can't run them like you would with Python. It doesn't even come with a C compiler!
- No folder tray (integrated explorer) – Unlike most other modern IDEs, Thonny doesn't show you the folder you're working in.
Advantages and disadvantages of Visual Studio Code
As a free and open source 'code editor' from Microsoft, Visual Studio Code can be expanded into a full-blown IDE by installing available extensions. Additionally, you can create your own extensions and contribute to the growing community of Visual Studio Code extension creators.
Advantages of Visual Studio Code
- Multi-language support – Using Visual Studio Code goes beyond Python. You can use most programming languages with it as long as you have the right extensions.
- Enable queuing of tasks – If your Raspberry Pi can handle it, you can queue a series of tasks to automate them – such as checking code before uploading to the microcontroller, then open it for serial communication.
- User accounts and workspaces – If you're sharing your computer with another developer, it may be easier to access your development setup by logging into your account or opening ' your workspace'. The workspace is your setting on the built-in file explorer. You can save this file to allow access to the same settings later.
- Ease of use – Visual Studio Code is easy to use and has many keyboard shortcuts.
Disadvantages of Visual Studio Code
- Can be Extremely Slow – This can be both a user-generated problem and one that comes with the program. Visual Studio Code takes longer to open and has no extensions.
- Running other languages can also be slow – Firstly, this is mainly an issue with the Raspberry Pi. If you are used to compiling scripts on a laptop or suitable computer, you will easily notice much slower compilation times when running Visual Studio Code on Rasbperry Pi. However, this is not a big problem with Python, as it is an interpreted language.
- A little confusing at first – With all the personalization options, using Visual Studio Code for the first time as a beginner can be a little confusing. After all, why should you care about syntax and errors when you haven't even produced your first 'Hello World' sentence?
What Thonny and Visual Studio Code have in common
Although Thonny and Visual Studio Code are two separate entities, they have a lot in common when it comes to functionality. The common functions that these two IDEs provide are listed below.
Complete Python support
Both Thonny and Visual Studio Code can run, debug, and help you edit Python code. They can also show you where you made mistakes.
Thonny includes an assistant that shows you what you did wrong, while the Python extension for Visual Studio Code gives you a runner and debugger plus syntax checking in one install.
Python Shell
Python provides a command line interface to the Python Shell. Run the code you wrote and print out the values in the shell.
Thonny has a terminal that allows users to access the shell at the bottom of the IDE. It is accessible and it won't take you any time to find it.
Meanwhile, Visual Studio Code is equipped with a Python extension and will not display the shell immediately. But when you press the 'Run' button , it opens Terminal and goes to Windows PowerShell. It works almost like the shell in Thonny.
So which option is better?
Which IDE to choose will really depend on your specific set of needs. You can narrow it down to just 4 criteria:
- Speed
- Function
- Hardware level programming
- Memory storage
Since Raspberry Pi can be quite poor in terms of speed and memory capacity, Thonny is better if you are doing memory-intensive projects, but this is not always the case. Regarding memory, you may want to use languages other than Python just to take full advantage of its processing speed. Therefore, the additional functionality on Visual Studio Code gives an advantage - you can try all other programming languages and see the difference.
Meanwhile, both options can have their own uses when it comes to programming hardware. First, the Raspberry Pi's general-purpose input-output pins can be controlled on the fly with Thonny. But for anything else that doesn't use Python, Visual Studio Code will do.
You should read it
- 9 extension Visual Studio Code for easier programming
- Visual Studio Code review: Microsoft's cross-platform code editor
- Compare 2 Visual Studio Code and Atom editors
- 10 tips for Microsoft's cross-platform code editing tool - Visual Studio Code
- How to install Visual Studio Code on Windows 10
- How to Install Visual Studio Code on Ubuntu 20.04
- Visual Studio Code now has an extremely useful color picker
- How to Install Visual Studio Using Parallels Desktop on a Mac
- Write code in a browser with Microsoft Visual Studio Online
- Visual Studio Community - Download Visual Studio Community here.
- Microsoft announced the launch of Visual Studio 2019
- How to Install Visual Studio Code on Arch Linux
Maybe you are interested
GitHub Copilot is now available for free in VS Code
Latest Sword Master Story Code and How to Enter Code
Latest Roblox Clicker Simulator Codes 12/2024
Ninja Team Code: Ninja Village 3D latest and how to redeem code
Full Giftcode Blue Lock Rivals Roblox latest and how to redeem code
Latest Anime Squad Simulator Codes and How to Enter Codes