Development on esieabot with VS Code
This section is dedicated to developing on esieabot using Visual Studio Code. This method does not use the VS Code Remote Development server because it is too heavy to run on a Raspberry Pi Zero. Instead, it uses Samba file sharing (Windows sharing protocol) to browse your esieabot’s files and the SSH protocol to execute remote commands.
Prerequisites
To develop on esieabot with VS Code, you must be connected to the same network as your esieabot. This can be the esieabot’s internal hotspot or any other network. Please refer to the dedicated documentation. Keep in mind the IP address of your esieabot.
Note
It is preferable to use a network other than the esieabot’s internal hotspot for better stability.
Installation
You need to install Visual Studio Code on your computer. If you haven’t done so yet, you can download it from the official website. No extension is required, everything is included by default.
Connecting to your esieabot
To connect to your esieabot, follow these steps:
Open a new Visual Studio Code window and click on “Open folder”
In the window that opens, manually enter the following path:
\\ip_address\pi(replaceip_addresswith your esieabot’s IP address)If this is your first connection, you will need to enter your esieabot’s Samba credentials. For more information, see the dedicated documentation.
Then click on “Select Folder” to open it in Visual Studio Code. If this is your first connection, you will need to validate your esieabot’s authenticity by clicking “Trust” in the window that opens.
You now have access on the left to all the files in the pi folder of your esieabot. You can browse the files and open them by double-clicking. If you make changes, they will be saved directly to your esieabot.
Note
If your esieabot changes its IP address, you will need to repeat these steps. As long as its IP address does not change, you can simply click on the IP address in the “Recent” section of a new VS Code window.
Opening a terminal
To open a terminal, you can click on “Terminal” in the taskbar and select “New Terminal”. You can then connect via SSH as usual. If needed, see the dedicated documentation for more information on using the terminal. Opening a terminal in Visual Studio Code allows you to directly compile and run your programs without having to switch windows.