I am using Visual Studio professional VS 2012. When my application runs, somewhere, somehow a certain boolean variable is being changed from true to false. I have set breakpoints everywhere the variable is assigned a value. The break points for the variable
are not being hit though when the value changes? I also placed a quick watch on the variable to show me when the assigned value changes, however it only shows the first time the value changes and nothing after that? I am a little lost in regards to the strategy
to debug this, if my watch window is not working and my breakpoints are not getting hit, The boolean value in question is a public member of a class, and is referenced by a class object. It is not static.I am stuck, Can someone good at debugging using Visual
studio help me out here?
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Member
139 Points
140 Posts
Not able to track the changing value of a parameter
Oct 01, 2017 10:30 PM|Gleeming|LINK
I am using Visual Studio professional VS 2012. When my application runs, somewhere, somehow a certain boolean variable is being changed from true to false. I have set breakpoints everywhere the variable is assigned a value. The break points for the variable are not being hit though when the value changes? I also placed a quick watch on the variable to show me when the assigned value changes, however it only shows the first time the value changes and nothing after that? I am a little lost in regards to the strategy to debug this, if my watch window is not working and my breakpoints are not getting hit, The boolean value in question is a public member of a class, and is referenced by a class object. It is not static.I am stuck, Can someone good at debugging using Visual studio help me out here?
All-Star
45489 Points
7008 Posts
Microsoft
Re: Not able to track the changing value of a parameter
Oct 06, 2017 08:16 AM|Zhi Lv - MSFT|LINK
Hi Gleeming,
By default, execution breaks every time that a breakpoint is hit.
If the breakpoint is not hit, I assume because of some logical conditions, the code is not executed.
MSDN Documentation for your reference:
Navigating through Code with the Debugger
https://msdn.microsoft.com/en-us/library/y740d9d3.aspx
Using Breakpoints
https://msdn.microsoft.com/en-us/library/5557y8b4.aspx
Best regards,
Dillion