Web Console UI Tour - Firefox Developer Tools 编辑

The Web Console's interface is split into three horizontal sections, detailed in the sections below.

Toolbar

The toolbar across the top contains a number of features:

  • Garbage can: Click this icon to clear the contents of the console.
  • Funnel: Click this icon to filter the messages that are displayed in the console.
  • Filter categories: You can click a filter category (such as Errors, Warnings, CSS, or XHR) to display just those types of messages.
  • Settings ("gear" menu): New in Firefox 71, you can click the gear icon to access the new settings menu, where you can toggle the following features on and off:
    • Persist Logs: When enabled, the console doesn't clear on page reload, or new page load.
    • Show Timestamps: When enabled, timestamps are shown on the left-hand side of each message row to say when the messages were logged.
    • Group Similar Messages: When enabled, similar types of messages are grouped together, with an indicator of the number of occurrences.
    • Enable Autocompletion: When enabled, the JavaScript interpreter attempts to autocomplete while you type.
    • Instant Evaluation: When enabled, the interpreter displays the evaluated results of an expression, when possible, before you press Enter to submit it.

Message display pane

This is where the messages appear, both those generated by the code in the page, and those generated by the commands entered on the command line.

See Console messages for a lot more detail on what the messages can contain.

Note: You can clear the contents of the console by entering the keyboard command Ctrl + Shift + L (Windows, macOS, and Linux) or Cmd + K on macOS.

Command line

The command line starts with double angle brackets (>>). Use it to enter JavaScript expressions.

In Firefox 71 onwards, there is a new "split pane" icon on the right hand side of the command line — clicking this will open the new console multi-line mode.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:82 次

字数:2894

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文