core icon indicating copy to clipboard operation
core copied to clipboard

An exception thrown in dotnet run in Ubuntu will cause the user input echo to be turned off

Open BAKAOLC opened this issue 2 years ago • 1 comments

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.

BAKAOLC avatar Jun 06 '23 10:06 BAKAOLC

@dotnet/area-system-console

carlossanlop avatar Jan 21 '25 16:01 carlossanlop