Solved

How to track a value in Visual Studio 2012

Posted on 2014-01-15
4
226 Views
Last Modified: 2014-01-19
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.

Thanks,
0
Comment
Question by:BlakeMcKenna
  • 2
4 Comments
 
LVL 40
ID: 39784195
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
0
 
LVL 5

Expert Comment

by:advfinance
ID: 39784888
0
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 500 total points
ID: 39785361
@advfinance

You need to be in C or C++ to use that feature, since it requires a pointer and pointers are not available in VB.
0
 

Author Closing Comment

by:BlakeMcKenna
ID: 39793413
Thanks James!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now