Property SelectedWatch
SelectedWatch
Gets a currently selected watch expression.
[Browsable(false)]
public string SelectedWatch { get; }
Property Value
Examples
Here is how to use a SelectedWatch in the C# code:
using Alternet.Scripter.Debugger;
using Alternet.Scripter.Debugger.UI;
public partial class Form1 : Form
{
private Locals localsControl;
private void Form1_Load(object sender, EventArgs e)
{
var debugger = new ScriptDebugger();
localsControl = new Locals();
localsControl.Dock = System.Windows.Forms.DockStyle.Fill;
localsControl.Debugger = debugger;
}
private void Button_Click(object sender, EventArgs e)
{
System.Windows.Forms.MessageBox.Show(localsControl.SelectedWatch);
}
}
Here is how to use a SelectedWatch in the Visual Basic code:
Imports System
Imports Alternet.Scripter.Debugger
Imports Alternet.Scripter.Debugger.UI
Partial Public Class Form1
Inherits Form
Private localsControl As Locals
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim debugger = New ScriptDebugger()
localsControl = New Locals()
localsControl.Dock = Windows.Forms.DockStyle.Fill
localsControl.Debugger = debugger
End Sub
Private Sub Button_Click(ByVal sender As Object, ByVal e As EventArgs)
Windows.Forms.MessageBox.Show(localsControl.SelectedWatch)
End Sub
End Class
Remarks
The SelectedWatch property can be changed by clicking on the appropriate watch in the variable\expression list displayed by this control.