Click here to monitor SSC

Laila Lotfi

.NET tools Brand Manager & Simple-Talk Editor

How to debug SharePoint with .NET Reflector Pro

Published Wednesday, September 01, 2010 6:33 PM

Renowned SharePoint trainer, author, and consultant, Sahil Malik has just posted a new video at Pluralsight OnDemand! on how to debug a SharePoint application with .NET Reflector Pro.

For those of you who don't know what .NET Reflector Pro is: it's a Visual Studio Add-in that allows you to decompile and debug third-party assemblies. So essentially, you can debug SharePoint as if you had the source code. You can step through the code, set breakpoints, etc.

This video is absolutely awesome, I even learnt some new debugging tips! He uses the tool in ways that I hadn't previously - e.g. setting a breakpoint to identify dynamically all callers of a method.

Towards the end, Sahil explains how forgetting to call or incorrectly calling Dispose() on SharePoint's objects is a common problem in SharePoint development and leads to memory leaks. He talks about how the Microsoft tool SPDisposeCheck makes a best effort at analysing your code to follow Microsoft's Best Practices but reports many false positives. He then continues to neatly show how you can use Reflector Pro to accurately zero in on all the situations where you may have forgotten to dispose objects.

In a nutshell, this is a video packed with useful content in just over 20 minutes - well worth watching!

Watch the video here

by Laila

Comments

No Comments
You need to sign in to comment on this blog

About Laila

I'm working for the .NET Tools division at Red Gate. These days, I'm spending most of my time working on SmartAssembly (.NET obfuscator, error reporting and feature usage reporting tool), and I'm currently looking to speak to anyone who has used the product for its error reporting technology. My email address: editor@red-gate.com
<September 2010>
SuMoTuWeThFrSa
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789
Migrating from OCS 2007 R2 to Lync: Part 4
 Having migrated the rest of our users and legacy resources across, and start getting ready to... Read more...

Automated Script-generation with Powershell and SMO
 In the first of a series of articles on automating the process of building, modifying and copying SQL... Read more...

Seth Godin: Big in the IT Business
 Seth Godin has transformed our understanding of marketing in IT. He invented the concept of 'permission... Read more...

Using SQL Test Database Unit Testing with TeamCity Continuous Integration
 With database applications, the process of test and integration can be frustratingly slow because so... Read more...

Converting String Data to XML and XML to String Data
 We all appreciate that, in general, XML documents or fragments are held in strings as text markup. In... Read more...