/dev tips

🎊   The Modern DevTools course has now started! Visit ModernDevTools.com to find out more   🎊

(172) Argument Hints Local Overrides - Drag and drop images (174)

Chrome DevTools: Identify objects created with a certain constructor

13th June 2018
Identify objects created with a certain constructor

Built into the DevTools Console is the Command Line API. You can use this JavaScript snippet:


To query for and retrieve objects which were created from the constructor you specify.

For example you can try:

If the above returns an empty array...
...try executing `new WebSocket('wss://url')` beforehand

// Discover all Promise objects

// Also works with user-defined constructors
class Person {}
new Person()

Sign up to receive a developer tip, in the form of a gif, in your inbox each week.