When working on embedded systems — especially robotics, sensing, and control experiments — serial monitor logs are critical for debugging and data analysis.
Manually copying serial output is inefficient. So here’s how to automatically save serial monitor output to a file when using VS Code + PlatformIO.
Step 1: Install Required Extensions
First, install the following VS Code extensions:
- PlatformIO IDE (by PlatformIO)
- Serial Monitor (by Microsoft)
The PlatformIO extension provides the embedded development environment, while the Microsoft Serial Monitor extension offers an alternative serial terminal if needed.
Step 2: Access the Serial Monitor
You can access the Serial Monitor in VS Code (PlatformIO) by clicking the Serial Monitor in the bottom status bar.
Step 3: Chose a folder to save the log files.
Step 4: Before opening the serial port, click on this button,
Then the file will be saved in the logs folder.






Top comments (0)