views:

1678

answers:

1

Is there an attribute I can use on a method so that when stepping through some code in Debug mode the Debugger stays on the outside of the method?

+19  A: 
 [DebuggerStepThrough]

(linky)

Andrew Rollings
Thanks. I'm such a "Logger", the debugger skills are getting rusty.
tyndall
What about an attribute for a property? [DebuggerStepThrough] is only valid on Classes, Structs, Constructors and Methods
Marchy
It works on properties too... You have to apply it at the get/set level...
Andrew Rollings