-
-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serial Monitor does not Autoscroll on new content received when view is not in focus #1724
Comments
See https://forum.arduino.cc/t/ide-2-0-2-serial-monitor-data-forgets-to-scroll-with-new-data/1060247 and https://forum.pjrc.com/threads/71588-Arduino-IDE2-Serial-Monitor-sometimes-does-not-work-continue-from-Upload-Thread?p=316574&viewfull=1#post316574 As posted above, AutoScroll was ON and that was not noted as problem. Focus above was failure to draw 'top lines', but those are OLD lines and new data below should have scrolled up and did not. So seems this should have been the real focus of this issue. Will change the title. |
Shared this video demo on the forum threads, might as well have it linked here too. https://www.youtube.com/watch?v=oHIKPysz9dI Problem not limited to Teensy, also happens with Arduino Leonardo. |
Updated to IDE 2.0.3 and the Blank/Clipped issue seems gone as the initial 'window' of text is now visible. At least this is the case with Updated PJRC Teensy Serial Monitor code. The IDE Serial Port Monitor code however once repeated the 'BLANK' window? Now is showing initial sketch output? However, there is a problem with AutoScroll: It scrolls for initial output from setup() - but stops there as additional output arrives it never moves to the scrolled bottom newest text? Code below prints an "A=" section then a "B=" section, it scrolls to "A=" then stops leaving the following "B=" portion offscreen. This can also be seen in that sketch when USB 'Message' is sent to the Teensy, which is echoed back. That arriving output stays offscreen and doesn't autoscroll into view. This behavior is changed from IDE 2.0.2: void setup() {
pinMode( LED_BUILTIN, OUTPUT );
digitalWrite( LED_BUILTIN, HIGH );
Serial.begin(115200);
while (!Serial);
digitalWrite( LED_BUILTIN, LOW );
Serial.println("\n" __FILE__ " " __DATE__ " " __TIME__);
Serial.print( "run secs A=" );
Serial.println( millis()/1000.0 );
delay(1000); // wait for a second
Serial.println("\n" __FILE__ " " __DATE__ " " __TIME__);
Serial.print( "run secs B=" );
Serial.println( millis()/1000.0 );
showSome( 3 );
}
void loop() {
// put your main code here, to run repeatedly:
if ( Serial.available() )
showSome( 3 );
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(500); // wait for a second
}
void showSome( int cnt ) {
static uint nn=1;
int ch;
while ( (ch=Serial.read()) > -1 ) {
Serial.print( (char)ch );
}
int ii;
for ( ii=0; ii<cnt; ii++ ) {
Serial.print( "See Me: " );
Serial.println( ii+nn );
}
nn+=ii;
} |
@Defragster does it eventually autoscroll into view if additional lines of output arrive? |
Generally no, except in some amusing pattern: Upload sketch (above) T_4.1 with IDE SerMon active - minimal out presented shows: C:\T_Drive\tCode\FORUM\serialIDE2test\serialIDE2test.ino Dec 5 2022 12:12:56 Upload again output in view advances only to: Go to Message and send 'Hello' - output advances to prior: Go to Message and send 'Goodbye' - output advances to prior: Mouse wheel Scroll down to see: Go to Message and send 'Arduino' - output does not advance. Same here IDE 2.0.3 Win 11 with IDE and PJRC Teensy Ports. |
Confirm, also seeing poor autoscroll behavior with IDE 2.0.3. Could record another video, if that would help? |
Hi @PaulStoffregen. The defect that is the subject of this issue: "Serial Monitor does not Autoscroll on new content received when view is not in focus" is already quite clear to me and easy to reproduce. So no additional clarification is needed. It is only necessary to wait for someone to prepare the code changes to fix the defect. As for what appears to possibly be a separate defect reported at #1724 (comment), I have not been able to understand it. If that is indeed a separate defect, please do submit a separate issue for it with a clear description of the problem and detailed instructions we can follow to reproduce it. We should be careful to keep each issue focused on a single subject because otherwise they become very difficult and time consuming for the team to manage. |
That last @per1234 comment "keep each issue focused on a single subject " refers to this #1724? The title was changed 6 days ago - which changed what the issue covered? This is okay as it seems a change from 2.0.2 to 2.0.3 has eliminated the problem related to this issue where the initially reported 'drawing on an out of focus Sermon display window' resulted in seeing a blank window when it was put in focus. Now the window text is updated and draws - but per new title and recent comments it just fails to automatically scroll to the latest arriving information. Seems for my last post here I did see a blank screen once - but all will be well perhaps in the end if auto scrolling starts working correctly as it seems to be a variant of the same evolving behavior of this issue. Indeed, if not then a new issue makes sense with then current details to repro. |
Closes #1724 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
Closes #1724 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
Describe the problem
Serial Monitor view does not autoscroll on new content received when the view is not in focus.
To reproduce
Equipment
Any Arduino board that can print to Serial Monitor.
Steps
ⓘ 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.
🐛 The printed text is not visible in the "Serial Monitor" view:
You will now see the printed text.
ⓘ The reason for the "immediately" instruction is to ensure the "Serial Monitor" view will have focus by the time the sketch program starts printing.
🙂 Serial output from the board is visible in the "Serial Monitor" view.
❗ The scroll is incomplete due to a separate bug: Serial Monitor scroll is incomplete when autoscroll is enabled #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:
Issue checklist
The text was updated successfully, but these errors were encountered: