如何在chrome的控制台视图中展开所有对象? [英] How do you expand all objects in the console view of chrome?
问题描述
我有扩展所有这些对象的捷径吗?我附了一张我想在下面扩展的照片.任何帮助都将是惊人的.
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.
推荐答案
在 devtools-on-devtools 的控制台中运行以下代码:
Run the following code in console of devtools-on-devtools:
$$('.console-view-object-properties-section').forEach(e => e._section._objectTreeElement.expandRecursively())
然后切换到原始devtools窗口.
Then switch to the original devtools window.
基于为方便起见,您可以将代码保存在代码段中并运行稍后从那里或在命令面板中键入代码段名称( Ctrl-P 或 Cmd-P 热键).
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).
-
首先打开devtools并将其在菜单中的
Dock side
切换到一个分离的(浮动的)窗口
Open devtools first and switch its
Dock side
in the menu to a detached (floating) window
在现在分离的devtools中按 Ctrl Shift i 或⌘ ⌥ i (在MacOS上,
它将在新窗口中打开 devtools-on-devtools
in the now detached devtools press CtrlShifti or ⌘⌥i on MacOS,
which will open devtools-on-devtools in a new window
这篇关于如何在chrome的控制台视图中展开所有对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!