Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual studio (MAC) Console Application [duplicate]

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.

like image 929
M. Pilarczyk Avatar asked Nov 19 '16 08:11

M. Pilarczyk


People also ask

How do I open console application on Mac?

Here's how to open Console on your Mac: Go to Applications > Utilities and double-click Console to launch it. You'll see your Mac listed on the left-hand side, along with any other Apple devices on your Wi-Fi network, and logged in to your Apple ID.

How do I debug a console application in Visual Studio?

Press F5 to run the program in Debug mode. Another way to start debugging is by choosing Debug > Start Debugging from the menu. Enter a string in the console window when the program prompts for a name, and then press Enter . Program execution stops when it reaches the breakpoint and before the Console.

How do you breakpoint in Visual Studio Mac?

Visual Studio 2019 for Mac also allows you to specify conditions and actions, and also other options, directly when adding a new breakpoint by right-clicking the left-most column in the code editor and then selecting New Breakpoint. This will open the Create a Breakpoint dialog, which looks like Figure 36.


1 Answers

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.

like image 82
Lex Li Avatar answered Sep 23 '22 16:09

Lex Li