Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
52 lines (30 sloc) 2.56 KB

Show All Instances

Find specific objects in memory that you want to explore

Overview

OzCode makes it trivial to find specific objects in memory that you want to explore. Just open Show All Instances of Type, and you’ll be able to see every object of that type that’s currently in memory. Why is that object still in memory? Are there any objects that contain this value? OzCode’s exciting new exploration tool effortlessly and instantly answers these questions and more.

Using Show All Instances

In order to run this demo click the Show All Instances button in the demo application.
Show All Instances button

Immediatly a message box pops since an exception was thrown:

Exception

Not very informative and we need to investigate this problem further.

To understand the problem we need to break when the exception is thrown, and so we can either use Visual Studio's built in exception settings dialog, or simply click the "Break on all CLR excetions" button:

Break on all CLR exceptions
Re-run the sample - you should break on SendInvoice call:

Exception thrown

A quick check should show the problem with this method call --> customerEmail is null which should not happen.

Customer is null

Unfortunalty InvoiceService implementation makes it hard for us to find which Customer caused the problem. And although we can quickly fix this issue by adding a check, we still need to find the offending customer! Since we only have the invoiceID we can look for it using OzCode's Search.

Use the watch to view pendingInvoiceId and choose 'Copy Value':

Copy value

Then, put your caret on the word 'Customer' (the class name) above, open the QuickActions menu:

Quick Actions

Choose 'Show all instaces of Customer' to make the dialog appear. Paste the invoice value in the seatch box (buttom) to search for the invoiceID you just copied:

Search for customer

Using the little 'eye' we can expand the selected customer to see all of the instance properties, and look for the emailAddress

Expend customer

Finally we can see that that customer was loaded without an emailAdress which means that we might have a data corruption problem on our hands.

No email

Back to Main