Reputation: 3474
The .net framework has the very useful Debugger Display Attribute which allows you to specify how a class or field is displayed in the debugger variable windows.
Is there an equivalent of this (which would work in chrome dev tools), which I can use on my JS objects?
Upvotes: 9
Views: 318
Reputation: 2617
There is Custom Object Formatters but it is in preview only and it seems to be hard to use. You seems to be better of adding some getter property that you can expand when needed
By the way do you know that for an unexpanded object the five properties that are shown are those that was first assigned to the object?
Upvotes: 1