Table of Contents

Property Breakpoints

Namespace
Alternet.Scripter.Debugger
Assembly
Alternet.Scripter.Debugger.v9.dll

Breakpoints

Returns collection of debugger breakpoints.

public IScriptBreakpoints Breakpoints { get; }

Property Value

IScriptBreakpoints

Examples

Here is how to use a Breakpoints in the C# code:

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,
        };

        debugger.Breakpoints.AddBreakpoint(scriptRun.ScriptSource.ScriptFile, 0);
        debugger.Breakpoints.AddBreakpoint(scriptRun.ScriptSource.ScriptFile, 11);
    }
}

Here is how to use a Breakpoints in the Visual Basic code:

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
        }
        debugger.Breakpoints.AddBreakpoint(scriptRun.ScriptSource.ScriptFile, 0)
        debugger.Breakpoints.AddBreakpoint(scriptRun.ScriptSource.ScriptFile, 11)
    End Sub
End Class

Remarks

Breakpoints are one of the most important debugging techniques in script debugging. Users can set breakpoints to pause debugger execution at the exact location, allowing them to see the values of local variables or examine the call stack.