Skip to content

feat: add a save-output action to the Serial Monitor - #2937

Open
iblackscreen wants to merge 1 commit into
arduino:mainfrom
iblackscreen:feat/serial-monitor-save-output
Open

feat: add a save-output action to the Serial Monitor#2937
iblackscreen wants to merge 1 commit into
arduino:mainfrom
iblackscreen:feat/serial-monitor-save-output

Conversation

@iblackscreen

Copy link
Copy Markdown

Motivation

Saving the Serial Monitor output to a file is a long-standing request (#549). Until now the only
way was copy and paste, which is limited by the selection issues around the virtualized output.
In physics classes, where Arduinos often serve as low-cost measurement instruments, saving a
recorded run directly from the Serial Monitor replaces a fiddly copy-and-paste step.

#2718 introduced a Copy Output toolbar button backed by the monitor's internal line buffer.
This PR adds the matching Save Output action.

Change description

  • New Save Output toolbar button next to Copy Output, backed by a new
    serial-monitor-save-output command.
  • The button opens the native save dialog (default file name
    serial-monitor-YYYYMMDD-HHMMSS.txt, filters for .txt/.log and all files) and writes the
    currently buffered output as plain text.
  • The text is produced by the exact same logic as Copy Output (linesToPlainText): raw output,
    null characters replaced with a visible symbol, no timestamps.
  • A short confirmation notification is shown after saving, following the Archive Sketch pattern.

Other information

This saves the currently buffered output (up to MAX_CHARACTERS, 1,000,000 characters), same as
the copy button. Continuous background logging to a file is a different feature and out of scope
here.

Fixes #549

Saving the Serial Monitor output to a file is a long-standing request (arduino#549). Until now the only way was
copy/paste, which is limited by the selection issues around the virtualized output.

This adds a Save Output toolbar button next to Copy Output. It opens the native save dialog (default file
name serial-monitor-YYYYMMDD-HHMMSS.txt, filters for .txt/.log and all files) and writes the currently
buffered output as plain text, produced by the exact same logic as the Copy Output button: raw output,
null characters replaced with a visible symbol, no timestamps (shared helper linesToPlainText). A short
confirmation notification is shown after saving, following the Archive Sketch pattern.

This saves the currently buffered output (up to 1,000,000 characters), same as the copy button.
Continuous background logging to a file is a different feature and out of scope.

Fixes arduino#549
@CLAassistant

CLAassistant commented Jul 7, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a save output to file option to serial monitor

2 participants