Property SelectedBreakpoint
SelectedBreakpoint
Gets currently selected breakpoint.
[Browsable(false)]
public Breakpoint SelectedBreakpoint { get; }
Property Value
Examples
Here is how to use a SelectedBreakpoint in the C# code:
using System;
using System.Diagnostics;
using Alternet.Scripter.Debugger;
using Alternet.Scripter.Debugger.UI;
public partial class Form1 : Form
{
private Breakpoints breakpointsControl;
private void Form1_Load(object sender, EventArgs e)
{
var debugger = new ScriptDebugger();
breakpointsControl = new Breakpoints();
breakpointsControl.Dock = System.Windows.Forms.DockStyle.Fill;
breakpointsControl.Debugger = debugger;
}
private void Button_Click(object sender, EventArgs e)
{
var bp = breakpointsControl.SelectedBreakpoint;
System.Windows.Forms.MessageBox.Show(string.Format("file: {0} line: {1}", bp.FilePath, bp.LineNumber));
}
}
Here is how to use a SelectedBreakpoint in the Visual Basic code:
Imports System
Imports Alternet.Scripter.Debugger
Imports Alternet.Scripter.Debugger.UI
Partial Public Class Form1
Inherits Form
Private breakpointsControl As Breakpoints
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim debugger = New ScriptDebugger()
breakpointsControl = New Breakpoints()
breakpointsControl.Dock = Windows.Forms.DockStyle.Fill
breakpointsControl.Debugger = debugger
End Sub
Private Sub Button_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim bp = breakpointsControl.SelectedBreakpoint
Windows.Forms.MessageBox.Show(String.Format("file: {0} line: {1}", bp.FilePath, bp.LineNumber))
End Sub
End Class
Remarks
The SelectedBreakpoint property can be changed by clicking on the appropriate breakpoint in the Breakpoint list displayed by this control.