C #: VS 2008 debugger executing property code

I have the following two lines of code:

lstvbWerteC.Clear ();
if (...)

lstvbWerteC - list field <T> with the class. If I set a breakpoint in the if statement in the VS 2008 debugger, I would expect lstvbWerteC.Count to be 0, but instead it is 1. My class has some properties that really populate the list. To prevent side effects in the debugger, all properties have an attribute [DebuggerBrowsable (DebuggerBrowsableState.Never)]. However, once the locals window is visible, the debugger seems to execute code populating the list. When the locals window is hidden, the list is always empty, reaching the breakpoint. Any information on debugger details related to this type of problem would be appreciated.

+5
source share
2

Visual Studio: - - - . " ".

Visual Studio 2010. Visual Studio 2008 ​​ - .

+5

, undefined . , , ( VS!) DebuggerBrowsable. , , .

" ", , , .

: " [] ". - , , , , . , .

+1

All Articles