Solved

How to track a value in Visual Studio 2012

Posted on 2014-01-15
4
227 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 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

20 Experts available now in Live!

Get 1:1 Help Now