Perhaps there is some setting I am unaware of, but No matter what I set the "autoscroll" button to, the Serial Monitor refuses to scroll unless I do it manually with my mouse wheel.
I find this is true whether I use the COM4 port or the Teensy port.
1 Like
Hi @weshowe . Does the problem also occur if you upload this simple sketch to your board?
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println("hello");
delay(1000);
}
weshowe
December 7, 2022, 12:22am
3
The sketch you uploaded works. Because it prints only 1 line at a time.
I modified it to this:
void setup() {
Serial.begin(9600);
}
void loop() {
for(int i=0; i<4; i++) {
Serial.print("hello ");
Serial.println(0+i);
Serial.print("hello ");
Serial.println(1+i);
Serial.print("hello ");
Serial.println(2+i);
}
while(1);
}
and this is what I got after it ran:
And after I manually scrolled the serial monitor:
Test it yourself. Printing any more than 1 line at a time will not properly scroll the monitor.
I purposely use the COM4 port for this test, rather than the Teensy port. I got bedeviled with the upload ghosting out on me.
I get the same results on the Teensy port (minus the upload ghosting out). It appears to not be losing data, just not scrolling properly.
I noticed this because a program I am working on has a tiny command processor in it, and it has a "dump" that prints a multi-line listing of various variable values (which I can alter with other commands). It currently prints 9 lines, and every time I use it I have to manually scroll to see the lines.
1 Like
Thanks for the additional information. This bug is being tracked by the Arduino IDE developers here:
opened 08:25AM - 04 Dec 22 UTC
topic: code
type: imperfection
topic: serial monitor
### Describe the problem
The Arduino IDE "**Serial Monitor**" view has a "**T… oggle Autoscroll**" control. When this is enabled, the view automatically scrolls down as the number of lines of data exceed the visible height of the view.
🐛 The autoscroll is not done completely, resulting in the most recently printed line only being partly visible.
### To reproduce
#### Equipment
- Any Arduino board capable of serial output.
#### Steps
1. Create a sketch that produces sufficient serial output to exceed the height of the "**Serial Monitor**" view:
```cpp
void setup() {
Serial.begin(9600);
delay(10000);
for (byte counter = 0; counter <= 100; counter++) {
Serial.print("hello #");
Serial.println(counter);
}
}
void loop() {}
```
1. Connect the Arduino board to your computer.
1. Select the board and port in Arduino IDE.
1. Open the "**Serial Monitor**" view if it is not already open.
1. Select "**9600 baud**" from the dropdown baud rate menu at the top right corner of the "**Serial Monitor**" view.
1. If it is not already enabled, click the "**Toggle Autoscroll**" icon near the top left corner of the "**Serial Monitor**" view to enable autoscroll.
1. Immediately select the "**Serial Monitor**" tab in the bottom panel.
**ⓘ** The "immediately" instruction, as well as the delay in the sketch, are required to avoid the demo's result being affected by a separate autoscroll-related bug `https://github.com/arduino/arduino-ide/issues/1724`
1. Wait until the sketch program's 10 s delay has passed.
🐛 The line shown at the bottom of the "**Serial Monitor**" view is not `hello #100` as expected:

1. Scroll the output field of the "**Serial Monitor**" view downward.
🐛 The field was not scrolled all the way to the end of the output even though autoscroll was enabled.
### Expected behavior
The most recently printed line is always shown above the bottom edge of the Serial Monitor view when autoscroll is enabled.
### Arduino IDE version
#### Original report
5695fd8
#### Last verified with
76f9f63
### Operating system
Windows
### Operating system version
10
### Additional context
I bisected the issue to https://github.com/arduino/arduino-ide/commit/ac9cce1 / https://github.com/arduino/arduino-ide/pull/1662 (it does not occur when using the build from https://github.com/arduino/arduino-ide/commit/c0af1e6)
---
This bug also occurred in previous versions of Arduino IDE: https://github.com/arduino/arduino-ide/issues/972, but was fixed by https://github.com/arduino/arduino-ide/pull/1446
---
Additional reports:
(from current incarnation of the bug)
- https://forum.arduino.cc/t/arduino-2-0-3-serial-monitor-autoscroll-inoperative/1062358
- https://github.com/arduino/arduino-ide/issues/1602#issuecomment-1368299055
(from time of the previous incarnation of the bug: https://github.com/arduino/arduino-ide/issues/972)
- https://github.com/arduino/arduino-ide/issues/1267
- https://github.com/arduino/arduino-ide/issues/1198
- https://github.com/arduino/arduino-ide/issues/812#issuecomment-1196261344
- https://forum.arduino.cc/t/ide-2-0-rc6-serial-monitor-window-clipping-on-bottom-line/984677
- https://forum.arduino.cc/t/serial-monitor-never-shows-the-last-line/1003734
### 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
Thanks for looking at this. But what I read in the bug report does not match this. In this bug, a print with multiple lines does not scroll whether the serial monitor is in focus or not.
It should scroll on line per newline received. It does not do that, even once, for multiple lines printed. It is obvious the data is received, but the scrolling just does not happen.
You must be looking at the wrong report. Focus is not mentioned anywhere in the one I linked above.
You are likely thinking of this other report, which is related in that it is also about autoscroll, but definitely distinct:
opened 05:32AM - 01 Dec 22 UTC
closed 03:11PM - 07 Mar 23 UTC
conclusion: resolved
topic: code
type: imperfection
topic: serial monitor
### Describe the problem
**Serial Monitor** view does not autoscroll on new c… ontent received when the view is not in focus.
### To reproduce
#### Equipment
Any Arduino board that can print to **Serial Monitor**.
#### Steps
1. Create a sketch that prints to Serial Monitor soon after the program starts:
```cpp
void setup() {
Serial.begin(9600);
for (byte counter = 0; counter < 100; counter++) {
Serial.println("hello");
}
}
void loop() {}
```
1. Press the <kbd>**Ctrl**</kbd>+<kbd>**Shift**</kbd>+<kbd>**P**</kbd> keyboard shortcut (<kbd>**Command**</kbd>+<kbd>**Shift**</kbd>+<kbd>**P**</kbd> for macOS users) to open the "Command Palette".
1. Select the "**Toggle Output View**" command from the menu.
**ⓘ** This step is only required if the "**Output**" view was not already open. That condition will be met as a matter of course during normal usage of Arduino IDE so the bug is not specific to the use of the "**Toggle Output View**" command.
1. Connect the Arduino board to your computer.
1. Select the board and port in Arduino IDE.
1. Open the "**Serial Monitor**" view if it is not already open.
1. Select "**9600 baud**" from the dropdown baud rate menu at the top right corner of the "**Serial Monitor**" view.
1. If it is not already enabled, click the "**Toggle Autoscroll**" icon near the top left corner of the "**Serial Monitor**" view to enable autoscroll.
1. Click the "**Clear Output**" icon at the top left corner of the "**Serial Monitor**" view.
1. Select **Sketch > Upload** from the Arduino IDE menus.
1. Wait for the upload to finish successfully.
1. Select the "**Serial Monitor**" tab in the bottom panel.
🐛 The printed text is not visible in the "**Serial Monitor**" view:

1. Scroll the output field of the "**Serial Monitor**" view downward.
You will now see the printed text.
1. Click the "**Clear Output**" icon at the top left corner of the "**Serial Monitor**" view.
1. Create a sketch that prints to Serial Monitor after a delay:
```cpp
void setup() {
Serial.begin(9600);
delay(10000);
for (byte counter = 0; counter < 100; counter++) {
Serial.println("world");
}
}
void loop() {}
```
1. Select **Sketch > Upload** from the Arduino IDE menus.
1. Wait for the upload to finish successfully.
1. Immediately select the "**Serial Monitor**" tab in the bottom panel.
**ⓘ** The reason for the "immediately" instruction is to ensure the "**Serial Monitor**" view will have focus by the time the sketch program starts printing.
1. Wait until the sketch program's 10 s delay has passed.
🙂 Serial output from the board is visible in the "**Serial Monitor**" view.
❗ The scroll is incomplete due to a separate bug: https://github.com/arduino/arduino-ide/issues/1736
### Expected behavior
All buffered output should be visibly displayed in Serial Monitor tab.
### Arduino IDE version
#### Original report
2.0.2
#### Last verified with
01ee045
### Operating system
Windows
### Operating system version
windows 11
### Additional context
Originally reported at https://forum.pjrc.com/threads/71588-Arduino-IDE2-Serial-Monitor-sometimes-does-not-work-continue-from-Upload-Thread?p=316565
Additional reports:
- https://forum.arduino.cc/t/ide-2-0-2-serial-monitor-data-forgets-to-scroll-with-new-data/1060247/1
- https://forum.arduino.cc/t/ide-2-0-2-serial-monitor-data-forgets-to-scroll-with-new-data/1060247/3
- https://forum.arduino.cc/t/ide-2-0-2-serial-monitor-data-forgets-to-scroll-with-new-data/1060247/4
- https://forum.arduino.cc/t/ide-2-0-2-serial-monitor-data-forgets-to-scroll-with-new-data/1060247/6
### 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
OK, I see you referenced this thread. I did veer off into a link to an older report. I hope it helps them get it fixed.
I've been trying to get more consistent about doing that lately. The idea is that it can help the project managers to determine priorities for allocating the limited development resources.
Some issues impact 1/1000000 users, while others impact a significant percentage of users. It is not always easy for the managers to understand which are most impactful. The number of reports we receive here on the forum can be seen as a somewhat of a metric.
So far, I have had to pay not one scintilla of attention to the compiler and linker underlying this. I admit I write rather defensively, from experience with compilers guided only by the K&R C book from decades ago.
My "adventures" tend to run a narrow band of features and a small subset of the available boards. The serial monitor is a very handy feature, if only because it is coordinated with the uploader such that normally you don't have to actively switch programs, disconnect/connect to the serial port and other exercises to write/compile/upload/test new code.
I am not seeking serious terminal capabilities in the serial monitor, mere text exchange is adequate.
jonikus
February 14, 2023, 5:45am
10
yes. autoscroll dosnt work. its ok if u got 1 or 2 lines in minute, but its become usless when u got 1 or 2 lines in second
What's the status of the Serial monitor? It's the only debugging tool I have for IDE 2.0.3. After a fresh compile, the Serial monitor shows nothing even though debug statements are in the code. If I power cycle the Teensy 4.1, then I can see my debugging statements. I'm using Win 11. I don't think the toggle for Autoscroll work either.
econjack:
After a fresh compile,
And upload, I assume?
Do you see the bayd rate selector at the right top side of the serial monitor when this happens. If not, it indicates that the IDE / serial monitor did no longer find the port.
I can't help you to solve it.
system
Closed
August 24, 2023, 4:23am
13
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.