Contents written to STDOUT lost when running in windows terminal #20638

Open
opened 2026-01-31 07:19:46 +00:00 by claunia · 0 comments
Owner

Originally created by @royqh1979 on GitHub (Oct 9, 2023).

Windows Terminal version

1.17.11461.0

Windows build number

10.0.19045.3448

Other Software

Microsoft Visual Studio Community 2019 (version 16.11.17)

Steps to reproduce

  1. Make wt the default terminal app for windows, through wt's settings page.
    2./ Create a C/C++ console project in the vs.
  2. Write the following codes to the auto generated cpp file:
#include <stdio.h>
#include <stdlib.h>
int main() {
	for (int i = 0; i < 1000; i++) {
		printf("%d\n", i);
	}
	system("pause");
	return 0;
}
  1. Build the project and generate the exe file.
  2. In the windows explorer, navigate to the project's Debug subfolder, double click the generated exe file to run it.
  3. The exe started to run in a wt window, and you will find that lines 1 to 900 is lost ( The details might depends on you wt window and font size)

Expected Behavior

From 0 to 999 should be displayed in 1000 lines.

Actual Behavior

Line 1-971 is lost.
Snap2

Originally created by @royqh1979 on GitHub (Oct 9, 2023). ### Windows Terminal version 1.17.11461.0 ### Windows build number 10.0.19045.3448 ### Other Software Microsoft Visual Studio Community 2019 (version 16.11.17) ### Steps to reproduce 1. Make wt the default terminal app for windows, through wt's settings page. 2./ Create a C/C++ console project in the vs. 3. Write the following codes to the auto generated cpp file: ```C++ #include <stdio.h> #include <stdlib.h> int main() { for (int i = 0; i < 1000; i++) { printf("%d\n", i); } system("pause"); return 0; } ``` 5. Build the project and generate the exe file. 6. In the windows explorer, navigate to the project's Debug subfolder, double click the generated exe file to run it. 7. The exe started to run in a wt window, and you will find that lines 1 to 900 is lost ( The details might depends on you wt window and font size) ### Expected Behavior From 0 to 999 should be displayed in 1000 lines. ### Actual Behavior Line 1-971 is lost. ![Snap2](https://github.com/microsoft/terminal/assets/8803140/3fd288a0-3704-48f6-a97c-bb1f75fb2295)
claunia added the Needs-TriageIssue-Bug labels 2026-01-31 07:19:46 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20638