Solved

How to track a value in Visual Studio 2012

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

813 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

10 Experts available now in Live!

Get 1:1 Help Now