Using Mole 2010 to analyze collections

When debugging an application it is often necessary to review and analyze the data stored by .NET objects in a collection. Using the standard debugging tools in Visual Studio 2010 to inspect large amounts of in-memory data can be a time consuming task, especially if you need to look at values stored by multiple objects in a collection.

For example, if you wanted to look at each Person object in a collection, you might use Visual Studio’s Watch window to inspect each Person object one at a time. You would have to expand each collection item in order to view its properties, and there is no easy way to work with that data outside of Visual Studio.

Wouldn’t it be better if you could see the properties of all objects in a collection at a glance?

Or better yet, what if you could export the collection to Excel and analyze it there instead?

Mole 2010 makes it much easier to review and analyze your application’s data. It allows you to view all objects in a collection of data at one time. It also enables you to export that data to a file on disk. When you export a collection of objects to disk, it is saved as a Comma Separated Value (CSV) file that can be opened in Excel.

Learn more about viewing and exporting collections with Mole 2010 here:

You can buy a copy of Mole 2010 here:



4 Responses to Using Mole 2010 to analyze collections

  1. David Cuccia says:

    Awesome guys, congrats on the release. Just picked up my copy! 🙂 One question for you…

    I’d like to be able to visualize large numeric arrays. I’ve created both a StackOverflow post and CodePlex project that demonstrates my problem:

    As you can see, it looks like VS2010 does not directly support debugger visualizers for built-in collections such as arrays.

    Can the Mole team somehow either 1) support custom WPF Mole visualizer templating or 2) implement these image templates for me? Happy to contribute and assign copyright…this would be a huge win for the work I’m planning in our OSS project at

    Thanks in advance!
    David Cuccia

  2. Josh Smith says:

    Hi David,

    Thanks a lot for buying Mole 2010 and your feedback!

    We also bumped into that limitation around visualizers being unavailable for collections. I honestly do not understand some of the artificial limitations that VS has regarding what types a visualizer can be opened for.

    We did not design Mole 2010 to support third-party extensions. Mole is a closed system at this time. We definitely see the value in supporting plug-ins that provide custom visualizations, but there are only so many hours in the day (bear in mind, we all work on Mole when we’re not at our full-time jobs). If we get a lot of customer requests for such a thing, we’ll certainly consider it in the future.

    Note, you can use your ArrayWrapper approach without needing to modify your source code to open a visualizer. You can type this into the Watch window in VS:

    new YourNamespace.ArrayWrapper(myArray);

    Hit the Enter key, then you should see a magnifying glass icon in the Watch window next to that line of code. Click it to open your custom visualizer.

    We allow the same technique for opening Mole 2010 on a WeakReference. You can pass any object into the WeakReference constructor, and Mole will be opened for that object (not the WeakRef itself).

    I hope that helps.


  3. Josh Smith says:

    Hey David,

    Since you’re working a lot with large arrays, I should point out to you that by default Mole 2010 will retrieve up to 1,000 items from a collection. If you need it to retrieve more (we support up to 10,000) you can adjust that user setting in the Tools | Options dialog. We need to impose that restriction because VS will kill a visualizer if it takes “too long” to complete a data retrieval operation. “Too long” is not very long at all, hence the safety precaution.

    We mention this feature on this documentation page:


  4. David Cuccia says:

    Thanks for the watch window tip!! I’ll update the SO post with your suggestion.

    I’m typically working with 10^5 to 10^7 datapoints per image or jagged-array image set (which is why text visualization is out of the question). I can see that if you’re serializing/deserializing, this could be a pretty “slow” operation. Direct visualization of the array would be fast though, and GPU-supported shaders could make the possibilities limitless with visualizing multi-dimensional datasets. However, I’m probably a niche customer in .NET computing at the moment, and I totally understand the day-job limits. Good luck to you and Karl with project Mole!

%d bloggers like this: