I'm not sure i understand you well, but seems you want to track variable changes.
1. Tracking variables is messy for set of reason...
2. If you want to be informed about variable changes, use
Class
and call event in setter, for example:
Public Class myVar
Private mValue As Integer
Public Event VariableChanged(ByVal mvalue As Integer)
Public Property Variable() As Integer
Get
Variable = mValue
End Get
Set(ByVal value As Integer)
mValue = value
RaiseEvent VariableChanged(mValue)
End Set
End Property
End Class
Usage:
Public Class Form1
Private WithEvents test As New myVar
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
test.Variable = CInt(TextBox1.Text)
End Sub
Private Sub VariableChanged(ByVal NewValue As Integer) Handles test.VariableChanged
MessageBox.Show(NewValue)
End Sub
End Class
Above code comes from:
vb.net - Detect variable change. [SOLVED] | DaniWeb[
^]
If i'm wrong and you want to track variables while debugging, use breakpoints, see:
Set a watch on variables - Visual Studio | Microsoft Docs[
^]