Chrome DevTools has a console feature called queryObjects that lets you find all the objects with a particular constructor; e.g.
queryObjects(Promise)
However, it seems to only display the objects, not return them. This means that I can't write, say,
queryObjects(MyCustomType)[4].getName()
Is there a way to do this?
I am using Chrome 67.0.3396.87
Once you've run the queryObjects(MyCustomType) command you can right-click on the resulting Array(XX) in the console and select "Store As Global Variable". It'd be better if you could just do let myThings = queryObjects(MyCustomType);
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With