Class Watches
Displays and evaluates watch expressions during script debugging.
public class Watches : VariablesEvaluationControlBase, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild, EvaluationResultsTreeController.IHost
- Inheritance
-
Watches
- Implements
- Extension Methods
Examples
Here is how to declare a Watches from the C# code:
using System;
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 watchesControl = new Watches();
watchesControl.Debugger = debugger;
}
}
Here is how to declare a Watches from 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 watchesControl = New Watches()
watchesControl.Debugger = debugger
End Sub
End Class
Remarks
Watches is a visual control used to examine the values of watch expressions when debugging code step-by-step.
The most important properties of the Watches are:
The Debugger property specifies the ScriptDebugger instance, which watches will be evaluated and displayed by the Watches control.
The SelectedWatch property represents the currently selected watch expression.
Constructors
- Watches()
Initializes a new instance of the
Watches
class with default settings.
Fields
Properties
- SelectedWatch
Gets a currently selected watch expression.
Methods
- AddWatch(string)
Adds specified expression to the list of watches.
- AddWatch(string, bool, bool)
Adds specified expression to the list of watches.
- Clear()
Clears watches list.
- EvaluateWatchExpressions()
Evaluates values of all expressions asynchronously.