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:

http://msdn.microsoft.com/en-us/library/cc667410.aspx

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.

#

posted on Wednesday, November 26, 2014 11:25 AM
Filed Under [ Visual Studio ]

Comments

No comments posted yet.

Post A Comment
Title:
Name:
Email:
Comment:
Verification: