Skip to main content
ESPBoards

ESP32, Arduino and VSCcode - the perfect match for rapid project development

Learn about the vscode Arduino - perfect Arduino IDE alternative. Visual Studio Code is the go-to Arduino IDE replacement for ESP32 development.


Why consider switching your development environment from Arduino IDE #

If you have ever used another IDE (Integrated Development Environment) for editing your source code and then tried the Arduino IDE, just like me, you must have noticed a lot of features lacking to be comfortable developing a full-fledged program. Especially when it comes to multi-file projects.

On the other hand, if you never tried other IDEs before, probably it seems fine - it has the code marking and offers the Arduino library and all the tools needed to start developing with Arduino. To start with ESP boards it is also fairly straightforward, you just need to install a library and voila! But trust me, if you will continue your development journey you will understand what you’re missing out on. So why wait and waste your time, when you can use VSCode and start learning proper shortcuts right away?

Following September 14, 2022 - the release date of Arduino IDE 2.0, things improved significantly, but I personally still miss a lot of features and that just decreases my productivity every time I use it.

But worry not, we know a solution we want to introduce you to… The VSCode or the full name Visual Studio Code.

What could be the Arduino IDE alternative? Have you heard of Visual Studio Code before? #

Visual Studio Code can be the best Arduino ide alternative. It is a source-code editor, or simply a code editor, released by Microsoft in 2015. It has gained a lot of popularity because it is free and comes with an extensions system, that provides rich features to the code editor.

Imagine that you write everything you ever need, in one text editor, and you have all the formatting, marking down the code, etc. in one place. § If you are not a fan of extensions, Visual Studio Code already ships with everything to cover your basic needs.

But if you want to develop in PHP and have suggestions for php code? There’s a PHP extension that also improves the marking of your code PHP code. Want to develop ESP32 with Arduino vscode? Sure, the community got you covered, there is a plugin for that!

Downsides of Arduino IDE and why should you replace it with VSCode as soon as possible #

Well, first, it is ugly. I know I know… that is a choice of preference, but I stated my preference already. Moreover, it comes with a white theme?! That’s not for real developers.

Also, there is no files manager tool, which makes working with different files a pain. You cannot easily see your project structure or even switch quickly between the tabs.

Another thing is the key bindings… I cannot properly duplicate lines, move them to different blocks of code using the keyboard, I cannot cut the whole line without selecting anything?! Now that is too much.

And of course, we must mention the official esp-idf vscode extension, which allows you to develop, flash, debug and do a lot more with the ESP32/ESP8266 boards using Visual Studio Code.

Arduino 2.x to the rescue #

You might say... "but everything is fixed in Arduino IDE 2.0". I definitely agree that the new version of Arduino IDE can be called the next level, compared to its predecessor. It even looks similar to the Visual Studio Code now, what a coincidence… Both Arduino IDE 2.x and Visual Studio Code are built with Electron, which is a framework for building cross-platform desktop applications using well-known web technologies such as HTML, CSS and Javascript.

Even though the new Arduino IDE looks promising for the future, it still has a lot of potential disadvantages that disturb your work and decreases productivity.

Or not?.. Maybe stick with the VSCode ESP32 development for now #

Maybe for a hobby project the mentioned disadvantages are not very important, but who wants to deal with IDE problems, when you could be spending this time working on the actual project?

It’s been reported about several compatibility issues with the Arduino IDE, including problems with the USB drivers and other hardware-related issues. Especially when it comes to esp dev boards.

Also, there are various issues with third-party library support. They were supported perfectly fine on the old Arduino IDE, but the new one just doesn’t work. And in our case, as we want to develop ESP32 and ESP8266 boards, not Arduino, we will need those third-party libraries a lot.

Overall, we would say that ESP32, Arduino and VSCcode are the perfect match for rapid project development, Visual Studio Code being the best IDE for Arduino and ESP32. So instead of wasting time with the lack of proper functionality to write code efficiently with Arduino IDE functionality or fighting with the known and unknown issues in the alternative Arduino IDE 2.0, for the time being, we strongly suggest considering switching to VSCode Arduino while using the ESP32 and ESP8266 boards.

VSCode vs Arduino IDE FAQs #

  • Is the Arduino IDE 2.0 available?

    • Yes, Arduino IDE 2.0 is released on September 2022 and is freely available to download from the official Arduino website. You can find a link in the Resources section
  • Is Visual Studio Code (VSCode) free?

    • Yes, Visual Studio Code is totally free and can be downloaded from the official Microsoft website. You can find a link in the Resources section
  • How difficult is it to switch from Arduino IDE to VSCode?

    • It should be fairly easy to switch your development environment to Visual Studio Code. You simply need to download the VSCode and install a few plugins and you are ready to go. We will provide step-by-step instructions in our next blog post.
  • Can I program the ESP32 with VSCode?

    • Yes, you can program your ESP32 using VSCode by using the official extension available for programming different microcontroller boards, including ESP32.
  • Can I program ESP8266 with VSCode?

    • Yes, you can easily program ESP8266 in VSCode. There is an official extension available that supports programming ESP8266 and provides all the necessary tools.
  • Can I use VSCode as an alternative to Arduino IDE on Linux and MacOS?

    • Of course. Visual Studio Code is a cross-platform application, therefore it can definitely be one of the best Arduino IDE alternatives for Linux and MacOS.
  • Can VSCode be an alternative Arduino IDE for Windows

    • Yes, Visual Studio Code is a cross-platform application, meaning you can use it as an alternative Arduino IDE for Windows.

Resources #