Table of Contents

Property Debugger

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

Debugger

Gets or sets IScriptDebuggerBase which breakpoints are displayed by this user control.

[Browsable(false)]
public IScriptDebuggerBase Debugger { get; set; }

Property Value

IScriptDebuggerBase

Examples

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

using System.Diagnostics;

using Alternet.Scripter.Debugger;
using Alternet.Scripter.Debugger.UI;

public partial class Form1 : Form
{
    private void Form1_Load(object sender, EventArgs e)
    {
        var debugger = new ScriptDebugger();
        var breakpointsControl = new Breakpoints();
        breakpointsControl.Dock = System.Windows.Forms.DockStyle.Fill;
        breakpointsControl.Debugger = debugger;
        breakpointsControl.BreakpointClick += BreakpointsControl_BreakpointClick;
    }

    private void BreakpointsControl_BreakpointClick(object sender, BreakpointClickEventArgs e)
    {
        if (e.Breakpoint != null)
        {
            System.Windows.Forms.MessageBox.Show(e.Breakpoint.FilePath);
        }
    }
}

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


Imports System
Imports Alternet.Scripter.Debugger
Imports Alternet.Scripter.Debugger.UI

Partial Public Class Form1
    Inherits Form
    Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
        Dim debugger = New ScriptDebugger()
        Dim breakpointsControl = New Breakpoints()
        breakpointsControl.Dock = Windows.Forms.DockStyle.Fill
        breakpointsControl.Debugger = debugger
        AddHandler breakpointsControl.BreakpointClick, AddressOf BreakpointsControl_BreakpointClick
    End Sub

    Private Sub BreakpointsControl_BreakpointClick(ByVal sender As Object, ByVal e As BreakpointClickEventArgs)
        If e.Breakpoint IsNot Nothing Then
            Windows.Forms.MessageBox.Show(e.Breakpoint.FilePath)
        End If
    End Sub
End Class

Remarks

Breakpoints UI control is used to manage (add, remove, disable) and display the debugger's breakpoints. You can associate the Debugger with the Breakpoints control by setting Debugger property.