Visual studio (MAC) Console Application

M. Pilarczyk picture M. Pilarczyk · Nov 19, 2016 · Viewed 16.8k times · Source

maybe some of you know, that Visual Studio (Preview) is ready to use.

I have simple question, maybe I did something wrong, or it doesn't work properly.

When I start to debug Console Application doesn't want to let me read name from keyboard.

string name = Console.ReadLine();
Console.WriteLine(name);

Can someone help me? I'd like to see how it works correctly.

Answer

Lex Li picture Lex Li · Nov 19, 2016

By default VS for Mac uses Application Output panel to simulate the console.

In your case, an external console should be used, which you should open Project Options and check the box before Run on external console under Run|Configurations|Default.