获取控制台历史记 [英] Get console history

查看:92
本文介绍了获取控制台历史记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道javascript中是否有办法检索控制台历史记录。

I'd like to know if there is a way in javascript to retrieve console history.

控制台历史记录的含义是dev工具控制台中显示的内容。
例如,我想在html页面中打印我的开发工具中显示的所有错误,警告,信息和日志,而不打开它们。

What I mean by console history is what appears in the dev tools console. For instance, I'd like to print in a html page all errors, warnings, info and log that are displayed in my dev tools without opening them.

如果我不清楚,请告诉我。

Let me know if I'm not clear.

推荐答案

Chrome扩展程序有一个API, experimental.devtools.console

Chrome extensions had an API for that, experimental.devtools.console:

chrome.experimental.devtools.console.getMessages(function(messages) {  })

此API已被删除。

这篇关于获取控制台历史记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆