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.Diagnostics;
using Alternet.Scripter.Debugger;
using Alternet.Scripter.Debugger.UI;
public partial class Form1 : Form
{
private void Form1_Load(object sender, EventArgs e)
{
var debugger = new ScriptDebugger();
var errorsControl = new Errors();
errorsControl.Dock = System.Windows.Forms.DockStyle.Fill;
errorsControl.Debugger = debugger;
errorsControl.ErrorClick += ErrorsControl_ErrorClick;
}
private void ErrorsControl_ErrorClick(object sender, ErrorClickEventArgs e)
{
if (e.Error != null)
{
System.Windows.Forms.MessageBox.Show(e.Error.Message);
}
}
}
Here is how to use a Debugger in the Visual Basic code:
Imports System
Imports Alternet.Scripter.Debugger
Imports Alternet.Scripter.Debugger.UI
Partial Public Class Form1
Inherits Form
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim debugger = New ScriptDebugger()
Dim errorsControl = New Errors()
errorsControl.Dock = Windows.Forms.DockStyle.Fill
errorsControl.Debugger = debugger
AddHandler errorsControl.ErrorClick, AddressOf ErrorsControl_ErrorClick
End Sub
Private Sub ErrorsControl_ErrorClick(ByVal sender As Object, ByVal e As ErrorClickEventArgs)
If e.Error IsNot Nothing Then
Windows.Forms.MessageBox.Show(e.Error.Message)
End If
End Sub
End Class