javascript 开发者工具 - 保留控制台记录
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5928492/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Developer Tools - preserve console record
提问by bsr
For Network, Profiles and Timeline, there is a record button, which preserves the log. Is there anyway I can do the same for console log?
对于网络、配置文件和时间线,有一个记录按钮,用于保存日志。无论如何我可以对控制台日志做同样的事情吗?
Sometimes, if there is an error in the script or during post submission, the page stop rendering or redirects and the console log clears. Is there any way to see the previous logs.
有时,如果脚本中或提交后出现错误,页面会停止渲染或重定向,并且控制台日志会被清除。有什么办法可以看到以前的日志。
采纳答案by serg
Currently not possible. Star this bug report, hopefully it will be implemented one day.
目前不可能。星这个错误报告,希望它会在某一天实施。
回答by jwerre
Click the settings button in the lower right corner. Under General > Console check "Preserve log upon navigation". I should mention that I'm using Chrome version 23.0.1271.101, so if you don't see the option try upgrading.
点击右下角的设置按钮。在 General > Console 下勾选“Preserve log on navigation”。我应该提一下,我使用的是 Chrome 版本 23.0.1271.101,所以如果您没有看到该选项,请尝试升级。
Update:
更新:
As of Chrome 59.0.3071.115 you need to click on the Console tab then click on the little gear icon and check Preserve log.
从 Chrome 59.0.3071.115 开始,您需要单击“控制台”选项卡,然后单击小齿轮图标并选中“保留日志”。