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 stack frames 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 callStackControl = new CallStack();
        callStackControl.Debugger = debugger;
        callStackControl.CallStackClick += CallStackControl_CallStackClick;
    }

    private void CallStackControl_CallStackClick(object sender, CallStackClickEventArgs e)
    {
        if (e.StackFrame != null)
        {
            MessageBox.Show(e.StackFrame.Name);
        }
    }
}

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


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 callStackControl = New CallStack()
        callStackControl.Debugger = debugger
        AddHandler callStackControl.CallStackClick, AddressOf CallStackControl_CallStackClick
    End Sub

    Private Sub CallStackControl_CallStackClick(ByVal sender As Object, ByVal e As CallStackClickEventArgs)
        If e.StackFrame IsNot Nothing Then
            MessageBox.Show(e.StackFrame.Name)
        End If
    End Sub
End Class

Remarks

By using the CallStack UI control, you can view the function or procedure calls that are currently on the debugging stack. You can associate the Debugger with the CallStack control by setting Debugger property.