Yes but you could also monitor properties of controls (which are
always global) so say when text1.txt changed you could stop the
porgram. Can you do that now?
As I said, variables are handled in a very different way now, so there is
no built in debugger method, but you will almost certainly find an
OnXXXChanged event on most third party components that is fired when XXX is
modified, and put a breakpoint there.
Incidentally, controls are not always global. This is a decision you make
at design time, and you can set in the component properties. Even then, the
form on which a control exists is not global, as unlike VB6 there is no
Form1.TextBox1, only myinstanceofForm1.TextBox1.
Besides which, I don't believe any of my developers would ever be daft
enough to write something like myinstanceofForm1.TextBox1.Text = "Fred
Bloggs" from another form! You would expect to see a 'CustomerName'
property added to the Form1 and the value set via that, or preferably a
'Customer' property that takes a Customer object, and that method sets all
the TextBox's etc.
This sort of 'improved' coding technique is much easier in .NET than it
ever was in VB6, and makes the need for "What changed this property?" type
features largely redundant.
I know that there are times when I want to know, for example, who is
setting the Text property of TextBox1 to say "Bog Off", so I just open the
form code and search for "TextBox1.Text =", and place a breakpoint on each.
It's certainly not as simple or friendly as the VB6 equivalent, but to be
honest I've never missed it since first moving to .NET.
Many of these 'nice' VB6 features encouraged very bad practices such as
'global' writing to variables and controls, which is also why VB6 got such
a reputation as a 'bodge' programming language. I worked with VB for 10
years, so I know exactly how easy it is to write a very bad program in VB6.
Interestingly enough, this type of issue is the main reason I always
recommend VB6 based companies move to C# instead of VB.NET, as it removes
the tendency for developers to persist badly structured coding techniques
into the new environment
This is not any sort of a 'This is better than That' type of posting, it's
just an observation, and in my opinion a semi-justification of Microsoft's
decisions regarding the .NET debugging environment.
Cheers,
Gadget