Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我在页面加载时打开了开发者控制台,我可以看到我所有的 console.log 语句都在记录。但是一旦页面完成加载(有或没有任何错误),控制台就会自动清除,我无法返回查看任何消息。我该如何阻止这种不受欢迎的行为?我想查看我的日志消息和对象。
控制台可能正在清除错误,因为它收到了页面已导航的(不准确的)通知。您可以从 F12 菜单关闭该行为:
Tools -> Clear Entries on Navigate -> Console (untick)
这能解决问题吗?