Hi,
I hope I am missing something very basic here.
In testing out some of my C# scripts in the Rhino 8 (8 SR15) ScriptEditor I have come across the following.
The following very simple example code runs fine when the green arrow or F5 is pressed in the script editor.
// #! csharp
using System;
using Rhino;
public class Test
{
public static void TestMethod()
{
RhinoApp.WriteLine("This is a test");
}
}
Test.TestMethod();
However, when a breakpoint is added (to the line RhinoApp.WriteLine("This is a test");
) for example, the following error is returned.
Compile Error
Keyword ‘this’ is not valid in a static property, static method, or static field initializer (Error CS0026)
As you can imagine, this makes it a lot more challenging to debug code.
I welcome suggestions as to how I can debug Rhino C# code with breakpoints in the script editor. I know I can also debug with breakpoints step by step in Visual Studio, but then I need to reload Rhino with every time I run the plugin. Script editor provides a nice intermediate step to get smaller blocks of code working before putting them into a full blown plugin.
Many thanks for your help,
Allan