Let’s debug!

After running you app in debug mode and pausing on a BreakPoint you will see the magic happens:

One of the most interesting points about this table is the Diff column while stepping through your code lines you will see how many new instances of objects have been created or destroyed!

I want to look for my own object (i.e ProfileModel class), so I search for it:

As you can see I have updated the ProfileModel variable in this line of code and I get the Diff +1 before GC remove the old one and also can access the old one which was not possible before. By double clicking on this record I will get instances of the ProfileModel class inside a window:

This window also allows you to filter instances by an evaluated expression using the class methods, for instance, you can use isSuccessful method of OkHttp Response class to filter unsuccessful responses loaded in memory:

Instances filter feature

Another useful feature is Tracking new instances, which you can enable by the right click menu inside Memory View Tool Window:

This feature helps you with tracking codes which have been generated the new instance of the class!

You can read more about this plugin inside JetBrains blog, and also let them know about new features that might come to your mind or bugs if you find some.