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 errors will be 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;
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 errorsControl = new Errors();
        errorsControl.Debugger = debugger;
        errorsControl.ErrorClick += ErrorsControl_ErrorClick;
    }

    private void ErrorsControl_ErrorClick(object sender, ErrorClickEventArgs e)
    {
        MessageBox.Show(e.Error.Message);
    }
}

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

Imports System
Imports System.Diagnostics
Imports System.Windows

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 errorsControl = New Errors()
        errorsControl.Debugger = debugger
        AddHandler errorsControl.ErrorClick, AddressOf ErrorsControl_ErrorClick
    End Sub

    Private Sub ErrorsControl_ErrorClick(ByVal sender As Object, ByVal e As ErrorClickEventArgs)
        MessageBox.Show(e.Error.Message)
    End Sub
End Class

Remarks

Errors UI control is used to display the debugger's errors and warnings. You can associate the Debugger with the Errors control by setting Debugger property.