terminal: Malformed/Partially destroyed Standard output from Visual studio (& others)
Windows Terminal version
1.15.2875.0
Windows build number
10.0.22000.1281
Other Software
Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.4.2
Steps to reproduce
- In Windows Settings, Windows Terminal should be set as default terminal.
- In Visual Studio, create new C++ project, with arbitrary name
- In arbitrary named .cpp file, insert this sample code:
#include <iostream>
int main() {
for(int i = 0; i < 100; ++i) {
std::cout << i << '\n';
}
return 0;
}
- Set Release and x64 mode.
- Click on “Start Without Debugging” button.
- Close the terminal.
- Click on “Start Without Debugging” button again.
- Scroll up.
Expected Behavior
I would expect to see previous output lines correctly when I scroll up.
Actual Behavior
There is no output above the previously visible text, or the output is malformed.
Note: Classic console works as expected in this scenario.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 24 (9 by maintainers)
Commits related to this issue
- Make conhost act in VtIo mode earlier in startup This is a theory. I want to audit the uses of `CONSOLE_INFORMATION::IsInVtIoMode` before I commit to this. But I think this: * fixes #15245 * fixes #... — committed to microsoft/terminal by zadjii-msft a year ago
- Make conhost act in VtIo mode earlier in startup (#15298) We need to act like a ConPTY just a little earlier in startup. My relevant notes start here: https://github.com/microsoft/terminal/issues/152... — committed to microsoft/terminal by zadjii-msft a year ago
- Make conhost act in VtIo mode earlier in startup (#15298) We need to act like a ConPTY just a little earlier in startup. My relevant notes start here: https://github.com/microsoft/terminal/issues/152... — committed to microsoft/terminal by zadjii-msft a year ago
@zadjii-msft I have the same bug. A simple for loop to print 100 lines will show the first 70 empty (only the ones now in view of the final frame of the console mind you, running it at 120x30, if I increase the height it displays it more correctly to a point).
Only with the Windows Terminal, not reproducible choosing Windows Console Host as the default. Only happens at the beginning of the program, if I print 10,000 lines the bug affects the first few hundred.
Tried to reset settings.json to no avail. Reproducible in VStudio, CLion, Codeblocks with msvc, gcc and clang. Not reproducible if debugging.