November 2014 Entries

Sometimes you just can’t figure out why stuff isn’t working as expected in your C# code due to odd things occurring within the .Net framework. So the first point of call might be to use a decompiler tool such as JetBrains dotPeek (free). Often this will help you to realize you are making the wrong call or the wrong sequence of calls due to subtleties of .Net.

However, sometimes this just will not shed the required amount of light of the issue at hand, so you think ‘If only I could step through the .Net Framework code!’.

As it turns out this is quite simple as Microsoft allow you to download the .pdb files directly from Visual Studio as described here:

So now when you run your application in Debug and hit a breakpoint, instead of seeing a stack trace full of greyed out entries, you can simply step through the code and work out either the framework has an issue…or more often, as I find, that you’re doing it wrong.

Hope this helps someone.