Table of Contents

Class Watches

Namespace
Alternet.Scripter.Debugger.UI
Assembly
Alternet.Scripter.Debugger.UI.v9.dll

Displays and evaluates watch expressions during script debugging.

[ToolboxBitmap(typeof(Watches), "Images.Watches.Icon.bmp")]
public class Watches : VariablesEvaluationControlBase, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl
Inheritance
Watches
Implements

Examples

Here is how to declare a Watches from the C# code:

using System;

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 watchesControl = new Watches();
        watchesControl.Dock = System.Windows.Forms.DockStyle.Fill;
        watchesControl.Debugger = debugger;
    }
}

Here is how to declare a Watches from 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 watchesControl = New Watches()
        watchesControl.Dock = Windows.Forms.DockStyle.Fill
        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

watchesTreeView

Properties

ResultsTreeView
SelectedResult
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.

Dispose(bool)

Clean up any resources being used.

EvaluateWatchExpressions()

Evaluates values of all expressions asynchronously.

Localize()

Localizes string resources.

OnDebuggerChanged(IScriptDebuggerBase, IScriptDebuggerBase)
SelectCurrent()