4

Whenever I try to debug some C# code in Visual Studio I keep getting this error code: Debugger operation failed - ScriptError: Not authorized to send Apple events to Terminal.

The project is created as a C# template.

I have tried googling the error message but I have not found anything of value. I have attached screenshots of the code and the error.

using System;

namespace test
{
    class MainClass
    {
        public static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
        }
    }
}

Debugger operation failed

ScriptError: Not authorized to send Apple events to Terminal.

Code snippet

Error message

PHPnewb
  • 43
  • 1
  • 6

1 Answers1

4

I have the same problem with you when i upgraded to mojave.. according to this link macOS Mojave, Automator “Not authorized to send Apple events to System Events.” you need to checklist terminal in System -> Preferences -> Security & Privacy -> Automation for Visual Studio..

Hope this help..

irfansidik
  • 51
  • 3
  • 1
    Thanks. The answer at the link works. Please update your answer though; the setting is at System Preferences > Security & Privacy > Automation not the path you have. – GrantVS Feb 10 '19 at 00:11
  • thank you for your correction @GrantVS.. i updated the answer – irfansidik Feb 10 '19 at 05:49