core
core copied to clipboard
An exception thrown in dotnet run in Ubuntu will cause the user input echo to be turned off
Description
I recently started to get in touch with Linux development. I found that when Console.ReadLine is called, throwing any exception within a short period of time and closing the program will cause the user input echo to crash. The terminal cannot display any input from the user, and the terminal response is also output in wrong position.
Configuration
dotnet 7.0.203 ubuntu 22.04.2
Regression?
simple to run this code with "dotnet run":
var result = Console.ReadLine();
Console.WriteLine(result ?? string.Empty);
throw new Exception("debug fatal error");
Other information
Running a compiled file will not cause this issue. Only when running 'dotnet run', other instructions are not tested. There is no such issue in Windows. I only tested Ubuntu and Windows.
@dotnet/area-system-console