I’m starting the switch to using the [DebuggerNonUserCode] attribute instead of [DebuggerStepThrough] attribute, and noticed a small annoying behavior. (For why I’ve decided to do this, this is what set me off).
When using [DebuggerStepThrough], you’ll be caught if you try and attach the attribute to a property, instead of the getter or setter for the property. You won’t be caught if you attach the [DebuggerNonUserCode] attribute to a property, but it won’t stop the debugger from stepping into the getter or setter then.
As a side note, as both a framework and application developer, I need to figure out a way to easily change these attributes – what I want to step into depends on my point of view – am I wearing my app developer hat or my framework developer hat ?