调用方法 CsScript Notepad++

问题描述

我在 Notepad++ 中使用 CsScript 创建了这个简单的方法 CallMethod。 如何从 VS 调用

namespace TestCall
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    public class ClassCall
    {
        public void CallMethod()
        {
            Console.Write("MethodCalling");
        }
    }
}

我制作了这个调用

namespace TestCall
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    public class Class1
    {
        public ClassCall a = new ClassCall();
        public void Invoker()
        {
            Console.Write("MethodCall");
            a.CallMethod();
            Console.Write("MethodCalled");
        }
    }
}

但是如何调用它用带有 CSScript 的 Notepad++ 打开,以便我可以调试它? 谢谢

解决方法

CS-Script 提供了一个调试选项,可以在您创建脚本时使用。 这是 github documentation

将光标放在要设置断点的行上,然后按 F9。

enter image description here