Property Debugger
Debugger
Gets or sets IScriptDebuggerBase
which errors will be displayed by this user control.
[Browsable(false)]
public IScriptDebuggerBase Debugger { get; set; }
Property Value
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 debugMenu = new DebugMenu();
debugMenu.Debugger = debugger;
debugMenu.DebuggerPreStartup += OnDebuggerPreStartup;
}
private void OnDebuggerPreStartup(object sender, EventArgs e)
{
MessageBox.Show("Debugger is about to start");
}
}
Here is how to use a Debugger in the Visual Basic code:
Imports System
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 debugMenu = New DebugMenu()
debugMenu.Debugger = debugger
debugMenu.DebuggerPreStartup += AddressOf OnDebuggerPreStartup
End Sub
Private Sub OnDebuggerPreStartup(ByVal sender As Object, ByVal e As EventArgs)
MessageBox.Show("Debugger is about to start")
End Sub
End Class