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.

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.

Is Thonny or Visual Studio Code better for Raspberry Pi users? Picture 1Is Thonny or Visual Studio Code better for Raspberry Pi users? Picture 1

Advantages of Thonny

  1. 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.
  2. 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.
  3. 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

  1. 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!
  2. 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.

Is Thonny or Visual Studio Code better for Raspberry Pi users? Picture 2Is Thonny or Visual Studio Code better for Raspberry Pi users? Picture 2

Advantages of Visual Studio Code

  1. 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.
  2. 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.
  3. 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.
  4. Ease of use – Visual Studio Code is easy to use and has many keyboard shortcuts.

 

Disadvantages of Visual Studio Code

  1. 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.
  2. 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.
  3. 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.

Is Thonny or Visual Studio Code better for Raspberry Pi users? Picture 3Is Thonny or Visual Studio Code better for Raspberry Pi users? Picture 3

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.

Is Thonny or Visual Studio Code better for Raspberry Pi users? Picture 4Is Thonny or Visual Studio Code better for Raspberry Pi users? Picture 4

 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.

Is Thonny or Visual Studio Code better for Raspberry Pi users? Picture 5Is Thonny or Visual Studio Code better for Raspberry Pi users? Picture 5

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:

  1. Speed
  2. Function
  3. Hardware level programming
  4. 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.

4 ★ | 1 Vote