3rd party terminal programs do work. It's a little inconvenient that you can't upload while it uses the serial port but is a small inconvenience compared to not being able to copy from serial monitor, Further most of them allow you to log to file which is very convenient.
Alternatively, use IDE 1.x; it does not suffer from this problem.
2024-12-05 IDE v2.3.3 and this bug is still present.
The serial monitor in the Arduino IDE is effectively broken by this lack of support for select and copy. This affects everyone using the platform and inhibits our ability to help others: no longer can I ask a novice user to run a sketch, switch to the serial monitor window and copy and paste the contents to an email or forum post.
The pushback from those here defending the lack of resolution to this issue is astounding.
Yes, experienced users can run any program they like to capture serial output. Have the Arduino devs forgotten that their core audience are new developers and students?
For those without time to read the rest of this thread. The issue is that selection of text in the serial monitor is limited to what is on screen at that time.
This has nothing to do with autoscroll.
Going to the top of the output, clicking and then scrolling to the bottom and clicking while holding shift, expecting all text to be selected, will only select the text visible on the screen.
Using CTRL+A selects text from the code window, not the terminal window (regardless of where the focus is).
The kludgy workaround is to select what is on screen, copy and paste, then scroll down and repeat.
I just reviewed the entire thread and didn't find any such thing.
What I do see is people trying to help others to find solutions. Are those solutions ideal? Absolutely not. But the real world is often less than ideal. It is understandable to be frustrated by that, but then you need to find some way to move forward.
I see you have found your own way forward and I thank you for sharing what you found.
Your own post, and the others like it, on top of the fact that this issue is over 2 years old without a fix, shows that whoever is working on the IDE is not taking this seriously.
This issue highlighted by this thread is simply dreadful behaviour in the software and it affects everyone who goes to arduino.cc and downloads the IDE. Just think for a second: every kid who gets an arduino for Christmas this year will be suffering under this issue, and the simple fact is that many will give it up simply because a text blob in a frame cannot be selected in the standard ways. Heck, I'm an experienced programmer and the moment I came across this bug I wanted to throw the damn thing out the window. It stopped me from posting debug information which was constructive feedback to another forum post, and that's just a tiny example among many.
Yes, this is criticism but it is well placed.
Now that we accept there is a big problem here, how do we get this fixed?
One quick fix I found was to output all data on the same line with a special symbol representing the new line, like "#" for example. Then you can copy all data and replace the "#" with new line elsewhere. To avoid scrolling right when copying the data at the end, add a stopping point where you println something, and it makes it easier to copy without scrolling. It's more messy than it should, but it was the only way to copy large amounts of data from the Serial Monitor.
Thanks for sharing your creative solution @elsawi. It should be noted that there is a bug in the Arduino IDE 2.x Serial Monitor that can cause the IDE to hang (or perhaps just consume large amounts of processing resources) when a large amount of data is printed to a single line in Serial Monitor:
Good point @ptillisch. I've used this method up to about 20K data points without issue. But you're absolutely right that going much larger could potentially cause issues.
Iβm not sure about your system, but I encountered similar issues a few years ago. I found that selecting from the end to the start worked just fine, so Iβve made it a habit to do it that way. I havenβt tried selecting top-down in years.
Just when I needed some diagnostic information, I can't access it.
Tried every trick in the book for selecting, copy and paste.
Turned off Auto scroll, select the whole lot, about 8500 lines, resulting copy and paste about 30 lines.
And an additional don't like, a lot of my output was formatted for 1.8 into Excel, more work than I like to get it right in 2.3.4.
Back to 1.8
Hi @tigger. For now, the best workaround will be to use a standalone serial terminal application. I can recommend the free open source PuTTY:
Please note that the Arduino IDE Serial Monitor's integration with Arduino IDE allows the IDE to automagically juggle the control of the port between Serial Monitor and the upload tool when you upload a sketch. That will not happen with an external terminal like PuTTY, meaning that if you leave PuTTY connected to the port while you attempt to perform an upload, it will block the upload tool from being able to use the port and cause the upload to fail. So you do need to to remember to close the port in the terminal application before you upload, then open it again after the upload finishes.
Thanks, got that and CoolTerm.
I'll take a look at the formatting.
I think it's a problem I had before.
In Win 11, copy a chunk of formatted text from 1.8 just get Paste with no options.
Same again from 2.3 get Paste options and Paste Special.
In Special, get 3 options including Text. Text works the other two don't.
Just another step, getting lazy.
Exactly how is it formatted in the Serial monitor ?
Are you outputting comma separated values, for instance ?
I don't know if it is any help because you have not provided any details of the problem, but you can run 2.3.5 and 1.8.19 at the same time and print from 2.3.4 and have the output go to the Serial monitor in 1.8.19
The only restriction is that you must close the Serial monitor in 1.8.19 when you upload the code from 2.3.5
Thanks
All formatting is in the sketch. It's a huge sketch.
The idea of running in two different versions looks good and worth a try.
Not using CSV, just tabbing and line return.
It used to go into Excel as separate cells as wanted, but seems to ignore the tabbing.
All I do is copy the line or block I need and paste into Excel.
I don't use specific characters as in CSV.
It's not a big deal, just some extra steps in 2.3.
It's part of my own smart metering.
Now courtesy of the Economy 7 transmitter shutdown, I'm to be forced onto a company smart meter. Not best pleased. Especially if there's no Watt hr LED.
@ptillisch
Thanks
I had a look at the article.
The problem does seem to be very similar in the use of the tab character.
I had used tab liberally in Serial print using 1.8 at the time and a line of output would arrange itself in Excel with data in the right columns. 2.3 doesn't, but will if you use paste special as Text, the third option. As I inferred, it was a nuisance, not a major issue, but a lot of effort had gone into getting it right.
I noted the last comment in Github " locked as too heated and limited conversation to collaborators on Sep 14, 2024"
@UKHeliBob
I started this project about 10-years ago and as usual, was more keen to get it working than spending time on formatting. Yes, it might have been better to use proper CSV from the start, but that's life.
@xfpd
Thanks for the information.
I was aware of the the delimited data options when copying data into Excel. I use them a lot for looking at output from banks etc.
The point is that using tab formatting in the sketch for pasting into Excel worked fine for many years in 1.8 etc, but doesn't in 2.3.
A bit of an aside, I'm no expert on spreadsheets, but I do go back to Ashton Tate Framework and Lotus Symphony/123.
Even further back, way before Office type software, I had to learn Fortran to run a curve fitting routine on a mainframe computer.
No screens, teletype keyboard, punched card input. 24-hour turnaround.
"Oh no, I missed out a comma" Start again. I even had someone drop a big bundle of cards (one card per line of code). As it was the boss, kept my mouth shut.
Now it's just minutes in Excel.
I could have plotted the data points on squared paper and used one of those flexible ruler things, but chose the harder route and got me here today.
If you are currently using tabs as data separators then it should be easy to globally replace them with commas unless you are outputting the tabs in a strange way.
How exactly are you outputting the tabs in your code ?
It won't help. The demonstration program in the bug report happens to use tab as a delimiter, but the fault occurs for comma delimiters as well.
When using delimiter separated data in general, I like to use tabs as a delimiter because, unlike commas, they are unlikely to occur in values. However, it is probably less important for the average Arduino project since the data is less likely to contain diverse strings that might contain problematic characters.