2

I found no solution/answer to this.

private void LogToConsole(EventLog eventLog)
{
    var type = TypeToStringOfUniFormLength(eventLog.Type);
    Console.WriteLine($"# {type} {eventLog.Message}");
}

This i my "Event-Logger" and i have a very special behaviour. Most of time it's works great. My Console (in console-application) is updated, but sometimes it just stops at the line "Console.Writeline...". The Console is not updated and the execution pauses there. When i click in the console and hit Enter. The Console is updated an the execution continues. There is no specific scenario to reproduce. Is anybody familiar with this error, or even has a solution to this. My next work arround is to just not use a console-app for this.

thank you for your help in advance.

Eugene Podskal
  • 10,270
  • 5
  • 31
  • 53
Daniel
  • 486
  • 4
  • 19

1 Answers1

3

Windows 10 console automatically enters the Mark/Selection mode when you click it(no need to right-click->Mark, like it is with earlier windows consoles).

This is what prevents the application from printing anything, but the application actually continues to work:

The application itself keeps running, but nothing is written to the screen.

Then

When you exit the selection mode, the process will resume as normal.

If it is not the case, then you will have to debug/dump your application to determine the culprit.

Community
  • 1
  • 1
Eugene Podskal
  • 10,270
  • 5
  • 31
  • 53
  • 2
    I ended up here because in my case execution did in fact stop until I clicked in the console window and hit ENTER. This was verified by watching files that the console application was working on. Windows 7 – Sean Anderson Oct 02 '18 at 17:40