Property State
State
Gets current debugger state.
public DebuggerState State { get; }
Property Value
Examples
Here is how to use a State in the C# code:
using System;
using Alternet.Scripter;
using Alternet.Scripter.Debugger;
public partial class Form1 : Form
{
private ScriptRun scriptRun;
private ScriptDebugger debugger;
private void Form1_Load(object sender, EventArgs e)
{
scriptRun = new ScriptRun();
scriptRun.ScriptLanguage = ScriptLanguage.CSharp;
scriptRun.LoadFile("myScript.cs");
debugger = new ScriptDebugger
{
ScriptRun = scriptRun,
};
}
private void Button_Click(object sender, EventArgs e)
{
System.Windows.Forms.MessageBox.Show(State.ToString());
}
}
Here is how to use a State in the Visual Basic code:
Imports System
Imports Alternet.Scripter
Imports Alternet.Scripter.Debugger
Partial Public Class Form1
Inherits Form
Private scriptRun As ScriptRun
Private debugger As ScriptDebugger
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
scriptRun = New ScriptRun()
scriptRun.ScriptLanguage = ScriptLanguage.CSharp
scriptRun.LoadFile("myScript.cs")
debugger = New ScriptDebugger With {
.scriptRun = scriptRun
}
End Sub
Private Sub Button_Click(ByVal sender As Object, ByVal e As EventArgs)
System.Windows.Forms.MessageBox.Show(State.ToString())
End Sub
End Class
Remarks
Checking ScriptDebugger state will be useful to update status of the application controls which are depended on the debugger.