I have a confusion on some piece of code.
Inside a class I have a property
Class A
{
ClassB objB;
public int TimedValue
{
objB.Timer;
}
}
Inside classB I have
classB
{
public int Timer
{
get
{
// get time value using some algorithm....
}
}
}
My confusion is that I place breakpoints inside the getters, but I dont see the program flow there and stop! Although I see an object being created and full populated with the TimedValue when I look at it in debug mode inside a watch window. Am I missing something on properties?
EDIT: So, ColinE guided me through the right steps, except I could not find the option there. Here is the screen shot where of where it was suppose to be,

My screen shot
I guess this is a VS bug. Anyway Just posted this so that anyone with team system 2008 should make a note of this :)
Typically the debugger is configures to step over properties, so your breakpoint will never be 'hit. Ensure that the following checkbox is not checked:
Tools => Options => Debugging => General => Step over properties and operators
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With