How to stop serial monitor without PIO crashing

I wish there was an option to pause the scroll output in serial monitor, as in Arduino IDE. As a workaround, I am using log to file so that I can debug my sketch.

Anytime I use the Bin icon to stop the terminal output, the PIO just freezes and I have to reopen the application.

Maybe I am not using the Serial Monitor controls correctly, so I would welcome your advice.

Okay that’s weird and shouldn’t happen but also the way to close the serial monitor is to click inside it and press Ctrl+C for abort. Does that work better?

PlatformIO depends on (the underlying serial monitor program) and VSCode here I think. Please file a feature request in Issues · platformio/platformio-vscode-ide · GitHub.

Edit: Issue opened per Pause scroll for Serial Monitor - Feature Request · Issue #2275 · platformio/platformio-vscode-ide · GitHub and serial monitor closing works better with Ctrl+C, so closing for now.


Hi Max - Thank you for taking time to help. Yes, I tried the Ctrl+C and it works great. It allows me scroll back to some of the previous lines, but not the beginning, which is why I am still relying on the log file. But it does allow me to stop the serial monitor without crashing, which is a success!!

I will post the feature request on GitHub as suggested.
Many thanks


@joatmon13 I am in the process of converting from Arduino to PIO, and re the Serial Monitor I am having the same problem as you. CTRL-C is helping under certain circumstances. But I read you log to a file.

Can you simply redirect all Serial.print() and log_X() to a file? How does one do this?

There’s a monitor_filters option for this.

Uiiiih, what a charm!