Class Breakpoints
Interaction logic for Breakpoints.xaml
public class Breakpoints : UserControl, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild
- Inheritance
-
Breakpoints
- Implements
- Extension Methods
Examples
Here is how to declare a Breakpoints and handle its events from 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 breakpointsControl = new Breakpoints();
breakpointsControl.Debugger = debugger;
breakpointsControl.BreakpointClick += BreakpointsControl_BreakpointClick;
}
private void BreakpointsControl_BreakpointClick(object sender, BreakpointClickEventArgs e)
{
if (e.Breakpoint != null)
{
MessageBox.Show(e.Breakpoint.FilePath);
}
}
}
Here is how to declare a Breakpoints 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 breakpointsControl = New Breakpoints()
breakpointsControl.Debugger = debugger
AddHandler breakpointsControl.BreakpointClick, AddressOf BreakpointsControl_BreakpointClick
End Sub
Private Sub BreakpointsControl_BreakpointClick(ByVal sender As Object, ByVal e As BreakpointClickEventArgs)
If e.Breakpoint IsNot Nothing Then
MessageBox.Show(e.Breakpoint.FilePath)
End If
End Sub
End Class
Remarks
Breakpoints is a visual control used to display and navigate through the list of breakpoints set in the source during script debugging.
The most important properties of the Breakpoints are:
The Debugger property specifies ScriptDebugger instance, which breakpoints are displayed by this Breakpoints control.
The SelectedBreakpoint property represents the currently selected breakpoint.
Constructors
- Breakpoints()
Initializes a new instance of the
Breakpoints
class with default settings.
Fields
Properties
- Debugger
Gets or sets
IScriptDebugger
which breakpoints are displayed by this user control.
- SelectedBreakpoint
Gets currently selected breakpoint.
Methods
- Clear()
Clears breakpoint list.
- Toggle(string, int)
Sets or removes breakpoint at a specified position.
- UpdateList()
Updates list of breakpoints from the debugger's breakpoints collection.
Events
- BreakpointClick
When implemented by a class, occurs when given process receives variables.
- BreakpointDeleted
Occurs when a given breakpoint is deleted.
- BreakpointStateChanged
Occurs when given breakpoint's enabled state changes.