Getting Started with Mole 2010, Mole 2012, and Mole 2013
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, 2012, or 2013 .
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.
Special Instructions for Visual Studio 2013
After much testing of WPF applications and Mole 2013 in Visual Studio 2013 found that Mole 2013 was opening very slow; about 6 seconds. After some research we found that by enabling “Use Managed Compatibility Mode” in the Debugger setting that Mole opened very fast.
Microsoft Visual Studio ALM Team has blog post that discusses this setting here Switching to Managed Compatibility Mode in Visual Studio 2013.
The other setting, “Warn if no user code on launch” needs to be set to false to avoid a warning message when Mole is started.
Molosoft will continue to research why Mole needs these setting to perform optimally, but for now, please use these settings to get the best performance.
How to Open Mole 2010, Mole 2012, or Mole 2013
Mole is a debugger visualizer that runs in Visual Studio 2010, 2012, and 2013. 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 or Windows 8 Modern applications, and Windows Phone applications are not supported by debugger visualizers.
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. Note: The data tip will display the version of Mole (2010, 2012, or 2013) that is associated with the version of Visual Studio you are using.
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, Mole 2012, or Mole 2013 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, 2012, or 2013)” is listed in a DataTip or debugging window. Mole is registered with Visual Studio to be an available visualizer for over 1600 .NET types. Meaning, Visual Studio will make Mole available for objects of those 1600 .NET types and all of their subtypes (i.e. derived classes).
There is one exception to this rule. Visual Studio 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, 2012, 2013)” 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