In the last two days I have received emails from developers I esteem as experts in their field regarding Mole. They basically asked the same question, “how can Mole be helpful with projects other an WPF?” I was going to add a section like this to the original Code Project article and now wish I had because other developers will be asking this same important question. Thank you to everyone who sent Mole emails and posted this question on the Code Project article.
All Visual Studio Projects
Collections
Viewing collection data in Mole is much easier than in Visual Studio. Basically with one or two mouse clicks you can view data inside your collection objects and collection objects that are part of the .NET framework. Example the Children or Controls properties.
Also Mole displays collections with multiple data types in them. Example ArrayLists can contain data with dissimilar data types. The WPF ItemsCollection can contain just about anything. Mole handles this scenario with ease.
Mole provides two views for the same data. Individual members of a collection are displayed in the properties grid and can also be viewed in data tables using the “View Data” button. The collection members in the properties grid can be drilled into exposing rich data about that member. The data table view provides the typical data row view of collection members.
There are two images of viewing collection data in the Code Project article.
Favorites
This was my first feature in Mole v1. I really wanted this.
Mole allows establishing Favorites to make getting to data you normally view much faster.
Let’s use the ComboBox for an example. When debugging in Visual Studio and needing to inspect a ComboBox, I’m always wanting to view the SelectedIndex, SelectedValue, etc. properties. These properties are towards the bottom of list and I need to scroll down. With Mole, you can simply add these properties to your Favorites. Then, every time you look at a ComboBox, these properties are at the top of the properties grid.
Searching
Mole allows you to search the properties grid to find what you’re looking for. You can search the property Name column and property Value column. With one or two keystrokes you can zero in on exactly what you’re looking for.
WinForm Project Example
Mole allows you to easily drill around your application, Visual Studio does not.
For example open a WinForms application, place a breakpoint and perform a “Quick Watch” on the form object. For C# target, “this” and for VB.NET target, “Me”. Look around, you’ll see lots of information about a Window object in the Visual Studio debugger.
Now visualizer the same object in Mole. Much more data that is easy to find and drill around is displayed. In fact the entire application is easily navigated. You can even view an image of each WinForm control.
This is one reason the Visualizer feature was put into Visual Studio. Visualizers allow the display of rich data in a customized format. The DataSet Visualizer is a good example of this. Mole just treats your entire application as rich data, displays it and allows you to drill around it.
ASP.NET Project Example
The same features described in the above WinForm section also applies to ASP.NET projects.
Depending on when you open Mole up in relation to the Page Cycle, Mole allows the developer to visualize the web page from a rendered Page point of view.
Open the provided Test Bench program for ASP.NET. When you view the default.aspx page using Mole, the Literal Controls added to the output stream of default.aspx are visible in Mole.
When using Mole with ASP.NET applications, developers can really “see” the difference in the “state” of their applications between “before a PostBack” and “after a PostBack.” When debugging a page before a PostBack has occurred objects are being constructed, data bases queried, DropDownList controls filled with data, etc. When debugging after a PostBack, these operations are probably not occurring because these objects can be persisted between PostBacks using ViewState. I think for new ASP.NET developers this tool is invaluable in teaching this important concept.
In all honesty, I’m may only be scratching the surface here. Maybe in the future, we’ll see blog postings and articles on getting the most from Mole or tools like Mole.
Mole is free and can be downloaded here: Mole For Visual Studo
Code Project article can be read at: Mole For Visual Studio Article
Please send your comments and feedback to molefeedback@yahoo.com
Thank you and enjoy Mole!
Just a grain of sand on the worlds beaches.


