PDA

View Full Version : Showing class names in the debugger (rather than Ext.apply.create.Class)



cdamon
18 Dec 2012, 9:46 PM
The new class system is nice, but it makes it tougher to debug since an instance of any class is labeled as 'Ext.apply.create.Class' in the debugger. In pure JS, it was very simple - you just added a "toString()" function to the class prototype, and its output would appear as the label.

I've tried to find a way around this (digging into __proto__ and other places I probably shouldn't go), but without success. For example, if I have a model class "ZCS.model.MailMsg", I want that to show up to the right of a var "msg" in the Local Variables area of the Scripts panel.

Is that possible? Or do I need to keep calling getDisplayName() to see what class something is an instance of?

mitchellsimoens
20 Dec 2012, 9:54 AM
Just one of the side affects of all the different things we do. Meaningful variables will usually suffice to understand what something is.