1

I'm working on a netcore 3.1 console application in Visual Studio 8.9.10 on mac. When running it the application executes in terminal window inside Visual Studio itself.

When i click Run button I would like it to run in mac terminal instead. I cannot find the proper setting in projects options - there's no checkbox like "Run on external console" or anything.

Thank you in advance.

2 Answers2

1

I'm not positive this is the only way, but my guess is that attaching a debugger to a program started from Terminal is the only way for now.

Something like this: https://stackoverflow.com/a/552788

Replicated here for ease and posterity:

using System;
using System.Diagnostics;
using System.Threading;

namespace DebugApp
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Waiting for debugger to attach");
            while (!Debugger.IsAttached)
            {
                Thread.Sleep(100);
            }
            Console.WriteLine("Debugger attached");
        }
    }
}
Jay Kint
  • 153
  • 1
  • 6
1

Visual Studio for Mac can be configured to use the macOS Terminal app in Preferences - Other - Terminal. Uncheck 'Enable integrated terminal' to use the external macOS Terminal app.

Preferences - Enable integrated terminal

Matt Ward
  • 47,057
  • 5
  • 93
  • 94