Getting Started

Getting Started with Mole 2010 and Mole 2012

Once Mole is installed and activated on your computer, you can use it to simplify debugging your .NET applications. This page contains a step-by-step walkthrough to help you start using Mole in Visual Studio 2010 or Visual Studio 2012.

If you prefer to use an interactive walkthrough that shows how to use Mole, please download Opening Mole 2010 then open it in Visual Studio 2010 and run the application by pressing F5.

How to Open Mole 2010 or Mole 2012

Mole is a debugger visualizer that runs in Visual Studio 2010 and 2012. You can open Mole while stepping through code after you hit a breakpoint. Mole can be opened for any .NET object, using the standard user interface for opening debugger visualizers in Visual Studio. Note: Silverlight, Metro and Windows Phone applications are not supported by debugger visualizers.

DataTips

One convenient way to open Mole is by using DataTips in the source code editor. Simply hover your mouse cursor over a variable in the source code, and a DataTip will pop open.

Now click on the dropdown button next to the magnifying glass to see a listing of all available debugger visualizers for that type of object.

Click on the ‘Mole 2010’ item to open Mole.

Debugging Windows

The standard debugging windows in Visual Studio can also be used to open Mole. The list of debugger visualizers can be found in the Watch, Locals, and Autos window.




Note, if there is only one debugger visualizer available for a given type of object you do not need to click on the dropdown button. You can simply click the magnifying glass icon to directly open that visualizer.

Mole 2010 or Mole 2012 is not shown in the DataTip for my object

Mole supports visualizing all .NET types.  However, there is a difference between what Mole supports and when “Mole 2010” is listed in a DataTip or debugging window. Mole is registered with Visual Studio 2010 to be an available visualizer for over 1700 .NET types.  Meaning, Visual Studio 2010 will make Mole available for objects of those 1700 .NET types and all of their subtypes (i.e. derived classes).

There is one exception to this rule.  Visual Studio 2010 does not make Mole available for types whose only base class from the .NET framework is System.Object. For example, suppose you wrote a Person class that derived from System.Object.  “Mole 2010” will not appear in the DataTip for an instance of that Person class.

If you want to start Mole using an instance of Person, you need to use an alternate technique. Using the Watch window, wrap an instance of Person in a System.WeakReference object. You can then open Mole for that WeakReference instance, and view the Person.


Learn More about Mole

If you would like to learn more about leveraging the features in Mole, please visit the product documentation here.