Skip to content

Serial Monitor autoscroll only makes bottom line partially visible #972

Closed
@per1234

Description

@per1234

Describe the problem

The Arduino IDE "Serial Monitor" view has a "Toggle 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. Upload a sketch that produces sufficient serial output to exceed the height of the "Serial Monitor" view.
    For example:
    int counter;
    void setup() {
      Serial.begin(9600);
    }
    void loop() {
      Serial.print("hello #");
      Serial.println(counter++);
      delay(500);
    }
  2. Open the "Serial Monitor" view.
  3. Select "9600 baud" from the dropdown baud rate menu at the top right corner of the "Serial Monitor" view.
  4. Select the "Toggle Autoscroll" icon at the right side of the bottom panel toolbar if it is not already.
  5. Wait for the serial output to exceed the visible height of the view.

🐛 The most recently printed line is only partly visible:

image

This is especially problematic when the line contains data that is important for the user to see at the time it is printed vs a constant data stream where the previous line serves just as well at the moment as the unreadable one.

Expected behavior

The most recently printed line is always shown above the bottom edge of the Serial Monitor view.

Arduino IDE version

2.0.0-rc6

Operating system

Windows

Operating system version

10

Additional context

I bisected the issue to aba9db6 (it does not occur when using the build from e5b3462)


The line does become fully visible if I manually scroll the Serial Monitor down.


Originally reported at:

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions