Property DefaultCommands
DefaultCommands
Gets IDebuggerUICommands
processed by this menu.
[Browsable(false)]
public IDebuggerUICommands DefaultCommands { get; }
Property Value
Examples
Here is how to use a DefaultCommands 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 DebugMenu debugMenu;
private void Window_Loaded(object sender, RoutedEventArgs e)
{
var debugger = new ScriptDebugger();
debugMenu = new DebugMenu();
debugMenu.Debugger = debugger;
}
private void StartButton_Click(object sender, RoutedEventArgs e)
{
debugMenu.DefaultCommands.Start();
}
}
Here is how to use a DefaultCommands 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 debugMenu As DebugMenu
Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim debugger = New ScriptDebugger()
debugMenu = New DebugMenu()
debugMenu.Debugger = debugger
End Sub
Private Sub StartButton_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
debugMenu.DefaultCommands.Start()
End Sub
End Class
Remarks
Usually any of the debugger commands, like StartDebugging, can be called by clicking on the appropriate button from the DebugMenu control. You can also directly call them from the DefaultCommands list.