How to debug into .NET Framework source code

Shawn Burke has posted the steps needed to step through the .NET Framework source when debugging your application.

Good news for a couple of reasons. The first is the most obvious: if you are getting surprising or perplexing behaviour, you now have a better chance of working out why.

Second, and perhaps more important, this makes it easier to submit bug reports or feature requests to Microsoft along the lines of “why does your code do this when it could or should do that“?

All going well, this should improve quality. For example, the .NET Framework library code is huge, and I’ve heard it muttered that there is considerable duplication within it. Separate teams working on different parts of the library may solve the same problem with different code, causing bloat and possibly inconsistency. Opening up the library to public scrutiny makes it more likely that issues like this will get fixed.

Daniel Moth has a screencast.