Table of Contents

Property Debugger

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

Debugger

Gets or sets IScriptDebugger 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 System.Windows;

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

public partial class MainWindow : Window
{
    private void Window_Loaded(object sender, RoutedEventArgs e)
    {
        var debugger = new ScriptDebugger();

        var breakpointsControl = new Breakpoints();
        breakpointsControl.Debugger = debugger;
        breakpointsControl.BreakpointClick += BreakpointsControl_BreakpointClick;
    }

    private void BreakpointsControl_BreakpointClick(object sender, BreakpointClickEventArgs e)
    {
        if (e.Breakpoint != null)
        {
            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.Wpf

Partial Public Class MainWindow
    Inherits Window
    Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
        Dim debugger = New ScriptDebugger()

        Dim breakpointsControl = New Breakpoints()
        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
            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.