Ninja SharePoint 2010 Debugging with .NET Reflector Pro

Posted on 9/1/2010 @ 9:46 PM in #Community by | Feedback | 2657 views

Debugging is a skill you must have when developing for SharePoint. Yes I know my good friend Uncle Bob has said Debugging is a skill you don’t want to brag about. I sorta agree with him. In a perfect world, and especially where you wrote every bit of the code, you should never have to debug .. your tests should cover the need for debugging.

But the reality is, in products that you didn’t write, and in products that you do not control, like third party products, for instance SharePoint, debugging is a necessary evil, and it is a skill that you must have. And no you shouldn’t be ashamed of being a ninja debugger (unless you are literally debugging ninjas!).

So, I recorded a full 1 hour length video for Pluralsight on Demand (which is online, or will be online shortly), and 20 minutes of which shows debugging with .NET reflector pro.

You can use these techniques to both learn about SharePoint, and diagnose those really hard to pin bugs or simply write better code. Well, allow me to shutup and watch the video. Enjoy.

Sound off but keep it civil:

Older comments..

On 10/12/2010 7:50:11 AM EE said ..
Very nice video, this helps me understand some SharePoint interfaces a lot better.

I cannot get around the limitations of the optimized code though. I'm trying to debug some of the stock webservices my client app is calling, and I can see the flow but I'm mssing many variable values: "Cannot obtain value of local or argument 'properties' as it is not available at this instruction pointer, possibly because it has been optimized away"

I've tried following the tips on the Reflector site ( about replacing the the ngen images, but without success. Should I be able to see more variables debugging these SharePoint dll's?

On 10/15/2010 1:36:46 PM Dima said ..
Very nice video - helped me a lot.

I have one issue similar to previous commenter:

How to debug Microsoft.SharePoint.Library.dll?

1. Reflector says that it should regenerated because there is no Debug signature in the assembly.

But when I tried to regenerate this assembly that is in GAC it fails on the Office.Server.dll regeneration.

2. I tried to copyied Microsoft.SharePoint.Library.dll assembly from GAC to local folder and referenced it in the project.

I was able to decompile it with Reflector but when debugger loaded it loaded assembly from GAC and I was not able to step into the method from this assembly.

Could you please share your experience if you have solved such issue?

Thank you,


On 5/19/2012 11:01:19 AM Frank said ..
Pity none of your links work!