微信小程序console向调试面板中打印日志

猪宝儿/ 2023年08月04日/ 小程序/ 浏览 1612

微信小程序console 是一个全局对象,可以直接访问。在微信客户端中,向 vConsole 中输出日志。


方法


console.group(string label)

在调试面板中创建一个新的分组。随后输出的内容都会被添加一个缩进,表示该内容属于当前分组。调用 console.groupEnd之后分组结束。


console.groupEnd()

结束由 console.group 创建的分组


console.log()

向调试面板中打印 log 日志


console.debug()

向调试面板中打印 debug 日志


console.warn()

向调试面板中打印 warn 日志


console.error()

向调试面板中打印 error 日志


console.info()

向调试面板中打印 info 日志

发表评论

暂无评论,抢个沙发...

客服 工单