How do you expand all objects in the console view of chrome?

google-chrome, google-chrome-devtools

Solution

Run the following code in console of devtools-on-devtools (see below),

modern Chrome: `$$('.console-view-object-properties-section').forEach(e => e.shadowRoot.querySelector('li').click())`

old Chrome: `$$('.console-view-object-properties-section').forEach(e => e._section._objectTreeElement.expandRecursively())`

Then switch to the original devtools window.

How to open devtools-on-devtools:

- Open devtools first and switch its `Dock side` in the menu to a detached (floating) window

- in the now detached devtools press CtrlShifti or ⌘⌥i on MacOS, which will open devtools-on-devtools in a new window

For convenience you can save the code in snippets and run it later from there or by typing the snippet name in the commands palette (Ctrl-P or Cmd-P hotkey).

Problem

Is there a short cut for me to expand all these objects? I have attached a photo of what i would like to expand below. Any help would be amazing.

Original source