DevTools Tips hero logo

DevTools Tips: How to log messages in the Console

Published on

The Console API allows you to log various messages to the Console from your JavaScript. The Console, in turn, has various useful display options. Watch the following video to learn all the skills.

With the Console API, you can:

  • Log, filter, and group the messages.
  • Interact with the current page.
  • Log variables.
  • Log and display object in various formats: tables, HTML elements, JSON objects.
  • Count function calls.
  • Display stack traces.
  • Measure the time elapsed between two points in code.

For a more hands-on learning experience, follow the Log messages in the Console interactive tutorial.

For a comprehensive list of all the Console API methods, see the Console API reference.

Published on Improve article

Back

Revamping Analytics in the Chrome Web Store Developer Dashboard

Next

Expanding Privacy Sandbox testing

This site uses cookies to deliver and enhance the quality of its services and to analyze traffic. If you agree, cookies are also used to serve advertising and to personalize the content and advertisements that you see. Learn more about our use of cookies.