console.dir(obj[, options])
obj<any>options<Object>showHidden<boolean> 如果为true,则对象的不可枚举和符号属性也将显示。 默认值:false。depth<number> 告诉util.inspect()在格式化对象时递归多少次。 这对于检查大型复杂对象很有用。 要使其无限递归,则传入null。 默认值:2。colors<boolean> 如果为true,则输出将使用 ANSI 颜色代码进行样式设置。 颜色可自定义;请参阅自定义util.inspect()颜色。 默认值:false。
在 obj 上使用 util.inspect() 并将结果字符串打印到 stdout。
此函数绕过在 obj 上定义的任何自定义 inspect() 函数。
obj<any>options<Object>showHidden<boolean> Iftruethen the object's non-enumerable and symbol properties will be shown too. Default:false.depth<number> Tellsutil.inspect()how many times to recurse while formatting the object. This is useful for inspecting large complicated objects. To make it recurse indefinitely, passnull. Default:2.colors<boolean> Iftrue, then the output will be styled with ANSI color codes. Colors are customizable; see customizingutil.inspect()colors. Default:false.
Uses util.inspect() on obj and prints the resulting string to stdout.
This function bypasses any custom inspect() function defined on obj.