Incorrect Console display, although the code is good

Paulius Paulaitis 1 Reputation point
2023-01-04T23:14:32.99+00:00

Hello,

my first question here, but got a really strange error. Asked my teacher but he was surprised too, and could not repeat this.

So I have a code with no errors, works fine on other computers, but mine almost always us with an incorrect display on Console.

Attaching the code and the screenshots. Console displays black info in the beginning and does not complete all the code, but I get no errors. If I debug the code and go step-by-step then no display error, everything is fine.

No similar problems with any other project or code. Tried to reinstall VS, tried to write a clean code on new project - the same result. Just curious - why and how to fix that.

276255-screenshot01.png

276301-screenshot02.png

276254-code.txt

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,604 questions
.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
322 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 55,686 Reputation points
    2023-01-04T23:38:19.547+00:00

    typically this means you are call async code incorrectly (the debugger forces the wait).


  2. Paulius Paulaitis 1 Reputation point
    2023-01-05T07:12:59.947+00:00

    Figured it out. It seems the problem was with the default Console for Windows 11. It was "Windows Terminal", changed it to "classic" Console (Settings >> Privacy & security >> For developers) and now everything is fine!

    Thanks @Viorel !

    0 comments No comments