console中一些不常用的实用方法

console.group('分组1');
console.table(
[
{key1: 1,key2: 2,key3: 3},
{key1: 1,key2: 2,key3: 3},
{key1: 1,key2: 2,key3: 3}
],
['key1', 'key2'] /*可选:要显示的key,其它忽略*/
);
console.groupEnd('分组1'); //------------------------- console.groupCollapsed('分组2'); /*默认关闭的分组*/
console.table(
[
{key1: 1,key2: 2,key3: 3},
{key1: 1,key2: 2,key3: 3},
{key1: 1,key2: 2,key3: 3}
],
['key1', 'key2'] /*可选:要显示的key,其它忽略*/
);
console.groupEnd('分组2'); //------------------------- console.timeStamp(); //在时间轴中添加一个标记 //------------------------- console.time('计时');
//do something
console.timeEnd('计时'); //------------------------- //条件断点的妙用
object.x = 1; //expression break point: console.table(object);
上一篇:FreeRTOS相关转载-(朱工的专栏)


下一篇:垂直方向兼容显示的内容多少的情况样式Flex布局