Safari开发工具:如何在导航时保留日志? [英] Safari Developer Tools: How to Preserve Log Upon Navigation?

查看:1011
本文介绍了Safari开发工具:如何在导航时保留日志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Safari Web Inspector 阅读JavaScript时控制台输出,日志在导航时重置,即从 index.html 翻页到 mail.html 清除控制台输出。在 Chrome开发人员工具中,我可以通过右键点击控制台空间轻松保留日志,选择导航时保留日志。使用此选项,控制台日志输出保持完整,直到我手动清除输出,简化调试JavaScript的过程,刷新或重定向到另一个页面。

When using Safari Web Inspector to read the JavaScript console output, the log is reset upon navigation i.e. going from page index.html to mail.html clears the console output. In the Chrome Developer Tools, I can easily preserve the log by right clicking on the console space and selecting Preserve Log Upon Navigation. With this option, console log output remains intact until I manually clear the output simplifying the process of debugging JavaScript that refreshes or redirects to another page.

Safari Web Inspector中是否有类似的功能?

Is there a similar feature in Safari Web Inspector?

推荐答案

我不知道这是什么时候添加的,但它存在于El Capitan它的工作原理与Chrome中的相同(在控制台窗口中右键单击,然后选择保持登录导航)。

I don't know when this was added, but it is present in Safari on El Capitan (Safari 9.0). It works the same as in Chrome (right click in the console window and select "Keep Log on Navigation").

这篇关于Safari开发工具:如何在导航时保留日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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