How to track a value in Visual Studio 2012

Can somone please tell me how to track a variable or control.value when it changes and cause a break in the program. I use to know how to do this in VB6 but not sure in VS 2012.

Who is Participating?
Jacques Bourgeois (James Burger)Connect With a Mentor PresidentCommented:

You need to be in C or C++ to use that feature, since it requires a pointer and pointers are not available in VB.
Jacques Bourgeois (James Burger)PresidentCommented:
In my opinion, this feature of VB6 is the only thing I lost when moving from VB6 to VB.NET 13 years ago.

Because .NET is always compiled, while VB6 was interpreted during development, there was no way to implement that feature in Visual Studio.

The only thing you can do that approach that is to set conditional breakpoints at various points in the code. That won't catch the exact line that cause the problem, but if done properly, you will know approximatively where it occurs.

To set a conditional breakpoint, set a standard breakpoint and right click on the red dot in the margin. Select condition and use it as you used to set a conditional breakpoint in VB6.

For everything else, VB.NET is always superior to VB6
BlakeMcKennaAuthor Commented:
Thanks James!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.