You can only copy what is visible in serial monitor window. If there is longer serial dump you can not copy it?
Why can’t this function be added? Is there any specific reson to not add it? I don’t understand.
1 Like
Hi @Bertolli . I have good news. The feature has been contributed by a community member:
main ← 502E532E:serial-monitor-copy-output
opened 10:21PM - 22 Apr 25 UTC
### Motivation When collecting data with the Arduino, a straight-forward way to… retrieve it is to write it to the serial monitor (often in csv format or similar) and store it somewhere. As addressed in various issues (#1081, #2093, #812), retrieving this data from the serial monitor is hard to impossible currently, as it does not really support copying, nor has the functionality to write the data to a file. ### Change description This pull request introduces a button that copies the content of the serial monitor to the clipboard. It uses the raw data stored in the frontend (an array of strings/lines) and joins it to a single string that is copied. This avoids the issue of formatted text completely (#2093) and makes it easy to copy the full content (#1081, #812). ### Other information In the long run (and in order to fully resolve the issues above), a proper copy mechanism of the current selection should be implemented. But this seems to be hard, some related issue (#105) is almost five years old and still open, although there was some implementation effort. This pull requests aim is to provide some small quality of life feature. It might be replaced by some farther reaching change in the future, or might even stay as it is useful as a quick action nonetheless. ### Feedback needed I created this pull request because I want to use the feature myself. I do not really understand the code structure and style conventions of this repository (Is there some style guide document? I could not find it), so I need feedback on these aspects. The code itself is working as I would want to use it, allowing to copy the content of the serial monitor to the clipboard. There is a test for the method that joins the lines, I am not sure if the GUI components require tests. - Is the functionality at the right location? The copying happens in serial-monitor-send-output, because it seems this is the only place where the lines are actually stored. It feels a bit wrong to do it there, though - Are more tests required? - Is there some documentation that needs updating? - Is the localization key reasonable? Does it need further action? ### Reviewer checklist - [ ] PR addresses a single concern. - [ ] The PR has no duplicates (please search among the [Pull Requests](https://github.com/arduino/arduino-ide/pulls) before creating one) - [ ] PR title and description are properly filled. - [ ] Docs have been added / updated (for bug fixes / features)
It will be in the next release of Arduino IDE.
In case you want to try it out right away, the feature will also be in the nightly build. However unfortunately we had a problem that resulted in the nightly build publishing system being down for the last few weeks, so it isn't actually in the current nightly build. Fortunately the developers made a fix for the publishing system earlier today. So I think it will be published in the next nightly build run.
I just manually triggered a run. Hopefully it will go through as usual. I'll post an update here once it is available.
1 Like
KurtE December 9, 2025, 10:18pm 3
I was about to respond, with don’t hold your breath, as we have had outstanding issues, like
opened 11:30PM - 05 Feb 22 UTC
topic: code type: imperfection topic: serial monitor
### Describe the problem Let's say I have 1000 lines of debug output in the ser… ial monitor window, how do I do a select all, such that I can copy it to the clipboard? With 1.8.19, I click the mouse into the monitor window and hit <kbd>**Ctrl**</kbd>+<kbd>**A**</kbd> and it selects all of the text. I can then hit <kbd>**Ctrl**</kbd>+<kbd>**C**</kbd> to copy to clipboard. ### To reproduce Run a sketch and try to select all of the text from Serial Monitor. 🐛 The contents of the sketch editor are selected when you press <kbd>**Ctrl**</kbd>+<kbd>**A**</kbd>:  ### Expected behavior I expected hitting <kbd>**Ctrl**</kbd>+<kbd>**A**</kbd> would select everything in that window not the source window. ### Arduino IDE version #### Original report Nightly build #### Last verified with 9a6a457bc44fb16f646b9e61a9e8b336b3666412 ### Operating system Windows ### Operating system version Not provided ### Additional context And/Or alternative solution - context menu like for example TyCommander  --- #### Additional reports - https://github.com/arduino/arduino-ide/issues/899 - https://github.com/arduino/arduino-ide/issues/1654 - https://github.com/arduino/arduino-ide/issues/1729#issuecomment-3217164468 - https://github.com/arduino/arduino-ide/issues/1817 - https://github.com/arduino/arduino-ide/issues/1918 - https://github.com/arduino/arduino-ide/issues/2328 - https://github.com/arduino/arduino-ide/issues/2431 - https://github.com/arduino/arduino-ide/issues/2520 - https://github.com/arduino/arduino-ide/issues/2674 - https://github.com/arduino/arduino-ide/issues/2743 - https://github.com/arduino/arduino-ide/issues/2773 - https://github.com/dankeboy36/esp-exception-decoder/issues/42 - https://github.com/dankeboy36/esp-exception-decoder/issues/51 - https://forum.arduino.cc/t/upgrade-the-serial-monitor-for-better-function/980128 - https://forum.arduino.cc/t/text-selection-serial-monitor/1005262 - https://forum.arduino.cc/t/random-seed-does-not-deliver-random-numbers/1006762/10 - https://forum.arduino.cc/t/coping-multiple-lines-on-monitor-screen/1019346 - https://forum.arduino.cc/t/serial-output-window-select-all-copy/1024251 - https://forum.arduino.cc/t/serial-monitor-issues-hopefully-fixed-before-release/1026548 - https://forum.arduino.cc/t/using-v-2-0-serial-monitor-print/1034093 - https://forum.arduino.cc/t/copy-paste-data-from-the-serial-monitor/1041585/5 - https://forum.arduino.cc/t/copy-paste-data-from-the-serial-monitor/1041585/19 - https://forum.arduino.cc/t/copy-paste-data-from-the-serial-monitor/1041585/21 - https://forum.arduino.cc/t/copy-paste-data-from-the-serial-monitor/1041585/23 - https://forum.arduino.cc/t/copy-paste-data-from-the-serial-monitor/1041585/32 - https://forum.arduino.cc/t/copy-paste-data-from-the-serial-monitor/1041585/38 - https://forum.arduino.cc/t/copy-paste-data-from-the-serial-monitor/1041585/39 - https://forum.arduino.cc/t/copy-paste-data-from-the-serial-monitor/1041585/45 - https://forum.arduino.cc/t/copy-paste-data-from-the-serial-monitor/1041585/46 - https://forum.arduino.cc/t/copy-paste-data-from-the-serial-monitor/1041585/48 - https://forum.arduino.cc/t/copy-paste-data-from-the-serial-monitor/1041585/60 - https://forum.arduino.cc/t/copy-paste-data-from-the-serial-monitor/1041585/61 - https://forum.arduino.cc/t/serial-monitor-copy-only-copied-the-visible-logs/1051846/1 - https://forum.arduino.cc/t/serial-monitor-copy-only-copied-the-visible-logs/1051846/4 - https://forum.arduino.cc/t/copy-of-the-serie-monitor-output/1056049/1 - https://forum.arduino.cc/t/copy-of-the-serie-monitor-output/1056049/5 - https://forum.arduino.cc/t/copying-from-serial-monitor/1071503/3 - https://forum.arduino.cc/t/ide-2-0-copy-from-serial-monitor-limited/1078391 - https://forum.arduino.cc/t/arduino-ide-2-0-3-serial-monitor-cant-use-cntrl-a-to-capture-everything/1095266 - https://forum.arduino.cc/t/arduino-ide-serial-monitor-bug/1112653/7 - https://forum.arduino.cc/t/why-does-click-into-serial-monitor-ctrl-a-mark-the-source-code/1128016 - https://forum.arduino.cc/t/cannot-select-all-of-serial-data/1158236 - https://forum.arduino.cc/t/how-can-i-copy-the-whole-content-of-the-serial-monitor/1168904/1 - https://forum.arduino.cc/t/your-reason-for-not-switching-to-the-2-x-ide/1176322/47 - https://forum.arduino.cc/t/code-in-the-arduino-is-fine-but-the-display-show-nothing/1204977/33 - https://forum.arduino.cc/t/ide-2-addition-suggestions-open-source-participation/1204792 - https://forum.arduino.cc/t/save-serial-data/1253788 - https://forum.arduino.cc/t/bug-report-serial-monitor/1297087 - https://forum.arduino.cc/t/ide-2-3-2-serial-monitor-ctrl-a-still-marking-only-the-source-code/1310325 - https://forum.arduino.cc/t/arduino-ide-copy-paste-on-serial-monitor-is-limited/1351189/1 - https://forum.arduino.cc/t/arduino-ide-copy-paste-on-serial-monitor-is-limited/1351189/5 - https://forum.arduino.cc/t/copy-paste-data-from-the-serial-monitor/1041585/87 - https://forum.arduino.cc/t/need-logging-or-save-to-file-for-the-serial-monitor/1383747 - https://forum.arduino.cc/t/ide2-x-buffersize-and-crtl-a-for-output-window/1409003 - https://forum.arduino.cc/t/add-function-to-allow-copy-all-from-serial-monitor/1418827 #### Related - https://github.com/arduino/arduino-ide/issues/549 - https://github.com/arduino/arduino-ide/issues/1081 - https://github.com/arduino/arduino-ide/pull/2718 ### Issue checklist - [X] I searched for previous reports in [the issue tracker](https://github.com/arduino/arduino-ide/issues?q=) - [X] I verified the problem still occurs when using the latest [nightly build](https://www.arduino.cc/en/software#nightly-builds) - [X] My report contains all necessary details
Which has been open almost 4 years now.
Thanks for adding that reference @KurtE .
@Bertolli to be clear, the standard "select all" capability is still missing for Serial Monitor. However, per the change I mentioned in my previous reply, we do now have an equivalent capability via the addition of a "Copy Output" button in the Serial Monitor toolbar.
1 Like
An update on this: the latest development version of Arduino IDE has now been published as a nightly build. You can download it by clicking the "DOWNLOAD " button under the "Nightly Builds " section of the "Software" page here:
https://www.arduino.cc/en/software/#ide-download-section
Please note that the nightly build is provided primarily to allow the community to contribute to the development of this open source software by doing beta testing and reporting any problems they might find. It is not intended for everyday usage for Arduino sketch project development and might be less stable than the release version.
If you do give it a try and encounter any problems, please let us know.
There is one known bug with the feature that affects its usability under certain specific conditions:
opened 07:50AM - 09 Dec 25 UTC
topic: code type: imperfection topic: serial monitor
### Describe the problem The "Copy Output" icon on the Serial Monitor toolbar c… opies the content from Serial Monitor's output panel to the clipboard (https://github.com/arduino/arduino-ide/pull/2718). Under certain conditions (e.g., https://github.com/arduino/arduino-ide/issues/927), non-textual content may be received by Serial Monitor. 🐛 If a null character (ASCII code 0) is received by Serial Monitor, the "Copy Output" feature will not work for any content received after that character. ### To reproduce #### Required equipment - Any Arduino board. #### Instructions 1. Create a sketch with the following code: ```cpp void setup() { Serial.begin(9600); while(!Serial) {} delay(750); Serial.println("content before null"); Serial.println("more content before null"); Serial.write(0); // Print a null character Serial.println(); Serial.println("content after null"); Serial.println("more content after null"); } void loop() {} ``` 1. Upload the sketch to the board. 1. Open Serial Monitor. 1. Select "**9600 baud**" from the menu in Serial Monitor. **ⓘ** This baud rate was picked arbitrarily when writing the demo sketch. The fault will occur with sketches that use any baud rate. 1. Click the "Clear Output" icon near the top right corner of the Serial Monitor panel. 1. Press and release the reset button on the board. - **ⓘ** This, and the previous step, are included to avoid the presence of irrelevant content in Serial Monitor - You should see the following content in Serial Monitor: ```text content before null more content before null ☐ content after null more content after null ``` 1. Click the "Copy Output" icon near the top right corner of the Serial Monitor panel. 1. Paste the copied output into any text editor. 🐛 The content after the null character was not copied: ```text content before null more content before null ``` ### Expected behavior All content in Serial Monitor is copied. ### Arduino IDE version 93d27ea ### Operating system Windows ### Operating system version Windows 11 ### Additional context For the sake of simplicity, the demo used a sketch that explicitly prints a null character. This is unlikely to be present in any real world sketch, though it is entirely possible for a real sketch program to produce null characters in output. For example: - due to a bug in the code - echoing textual data received from a peripheral device, which is producing null characters The far more common cause of null characters in Serial Monitor is a bug that causes the upload process to consistently produce these characters: https://github.com/arduino/arduino-ide/issues/927 This will cause the "Copy Output" feature to be very unreliable for anyone using one of the affected official Arduino boards on a Windows machine (and this is very common in the Arduino IDE user base). <a name="workaround"></a> #### Workaround If the source of the null characters is https://github.com/arduino/arduino-ide/issues/927, you can use the workaround provided there: https://github.com/arduino/arduino-ide/issues/927#user-content-workaround alternatively, you can use the following procedure as a workaround: 1. Upload a sketch. 1. Click the "Clear Output" icon near the top right corner of the Serial Monitor panel to remove the problematic content that was added by the upload. 1. Press and release the reset button on the board to restart the sketch program. --- <details> <summary><b>Keywords</b></summary> <p> - "garbage" - "gibberish" - "spurious" - "trash" </p> </details> ### Issue checklist - [X] I searched for previous reports in [the issue tracker](https://github.com/arduino/arduino-ide/issues?q=) - [X] I verified the problem still occurs when using the latest [nightly build](https://www.arduino.cc/en/software#nightly-builds) - [X] My report contains all necessary details
A workaround for that problem is described here:
https://github.com/arduino/arduino-ide/issues/2827#user-content-workaround