Today I was debugging some code and was not able to break into some code of a component; the debugger just failed to recognize it. Turns out the method was decorated with the [DebuggerNonUserCodeAttribute]. Its a neat way to restrict code from being debugged/stepped into. The attribute can be applied to structs, classes, methods, properties and as one may guess not for interfaces. Do note that these attributes are useful only to debugging tools so if you end up writing an implementation for ICorDebug :) you can very well ignore these attributes.
Mike Stall has a relevant post aptly named "How can I debug Just My Code?". One may also want to read about what's new in 2.0 debugging...
No comments:
Post a Comment