Skip to content

Unexpected behavior of the Console class in Windows Terminal #113895

Open
@f2bo

Description

@f2bo

I was looking at doing something slightly more involved with the Console class than my occasional calls to WriteLine or ReadKey. I began to look at some other properties and methods I hadn't used previously to understand how they should be used and noticed that many did not seem to work as documented.

To give an example, the LargestWindowHeight property, which supposedly should return the height of the largest possible console window measured in rows. However, that didn't seem to be the case in my tests where it returned a larger number. Or some samples in the documentation that didn't do what they claimed to do.

It then occurred to me that perhaps this might be related to the use of the Windows Terminal and after switching to the Windows Console Host, things began to make a little more sense.

Of course, it would be desirable for all Console features to be available in Windows Terminal given that it is now the default. I also imagine that I'm not the first person to have noticed this and that there's some technical hurdle to make them work. However, I'm a little surprised that the documentation and samples do not reflect any of this. At the very least, they should indicate which methods or properties are not supported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.ConsoledocumentationDocumentation bug or enhancement, does not impact product or test codeuntriagedNew issue has not been triaged by the area owner

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions