Table of Contents

Class DebuggerControlToolbar

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

Interaction logic for DebuggerControlToolbar.xaml

public class DebuggerControlToolbar : ToolBar, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild, IContainItemStorage
Inheritance
DebuggerControlToolbar
Implements
Extension Methods

Examples

Here is how to declare a DebuggerControlToolbar and handle its events from 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 debuggerControlToolbar = new DebuggerControlToolbar();
        debuggerControlToolbar.Debugger = debugger;
        debuggerControlToolbar.DebuggerPreStartup += DebuggerPreStartup;
    }

    private void DebuggerPreStartup(object sender, EventArgs e)
    {
        foreach (var edit in codeEditContainer.Editors)
        {
            if (edit.Modified)
                edit.SaveFile(edit.FileName);
        }
    }
}

Here is how to declare a DebuggerControlToolbar and handle its events from 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 debuggerControlToolbar = New DebuggerControlToolbar()
        debuggerControlToolbar.Debugger = debugger
        AddHandler debuggerControlToolbar.DebuggerPreStartup, AddressOf DebuggerPreStartup
    End Sub

    Private Sub DebuggerPreStartup(ByVal sender As Object, ByVal e As EventArgs)
        For Each edit In codeEditContainer.Editors
            If edit.Modified Then edit.SaveFile(edit.FileName)
        Next
    End Sub
End Class

Remarks

DebuggerControlToolbar is a toolbar control that allows executing debugging commands such as Run/Stop/StepInto/StepOver when debugging the script.

The most important properties of the DebuggerControlToolbar are:

The Debugger property specifies ScriptDebugger instance will be executed when the user interacts with the toolbar.

The AllowedDebuggerCommands property represents a set of commands accessible through the toolbar.

Constructors

DebuggerControlToolbar()

Properties

AllowedDebuggerCommands

Gets or sets an allowed commands.

CommandsListener

Gets or sets a list of the Debugger commands for the Debugger UI.

Debugger

Gets or sets IScriptDebuggerBase which errors will be displayed by this user control.

DefaultCommands

Gets IDebuggerUICommands processed by this toolbar.

Methods

Localize()
OnAllowedDebuggerCommandsChanged()

Events

DebuggerPreStartup