Overview Open Chrome DevTools Simulate mobile devices with Device Mode Performance insights: Get actionable insights on your website's performance Lighthouse: Optimize website speed Animations: Inspect and modify CSS animation effects Changes: Track your HTML, CSS, and JavaScript changes Coverage: Find unused JavaScript and CSS CSS Overview: Identify potential CSS improvements Issues: Find and fix problems Media: View and debug media players information Memory Inspector: Inspect JavaScript ArrayBuffer Network conditions: Override the user agent string Recorder: Record, replay and measure user flows Security: Understand security issues WebAuthn: Emulate authenticators
Overview Open Chrome DevTools Simulate mobile devices with Device Mode Performance insights: Get actionable insights on your website's performance Lighthouse: Optimize website speed Animations: Inspect and modify CSS animation effects Changes: Track your HTML, CSS, and JavaScript changes Coverage: Find unused JavaScript and CSS CSS Overview: Identify potential CSS improvements Issues: Find and fix problems Media: View and debug media players information Memory Inspector: Inspect JavaScript ArrayBuffer Network conditions: Override the user agent string Recorder: Record, replay and measure user flows Security: Understand security issues WebAuthn: Emulate authenticators

Watch JavaScript values in real-time with Live Expressions

Published on Updated on

If you find yourself typing the same JavaScript expression in the Console repeatedly, you might find it easier to create a Live Expression. With Live Expressions, you type an expression once and then pin it to the top of your Console. The value of the expression updates in near real-time.

Create a live expression

To pin an expression to the top of the Console:

  1. Open the Console.

  2. Click Create Live Expression. Create Live Expression. The Live Expression text box appears.

  3. Type your expression in the text box. For example, you can use a live expression to track element focus.

    Typing document.activeElement into the Live Expression text box.
    Gotchas

    To type a multi-line expression, start the new line by pressing Shift+Enter.

  4. Press Enter to save the expression, or click outside of the Live Expression text box.

The value below the pinned expression is its result. The result updates every 250 seconds.

Add multiple expressions

To pin multiple expressions in parallel, click the Create a live expression. Create Live Expression button as many times as you need.

You can only see several pinned expressions at a time but you can scroll the expressions list to view all of them.

Scroll the pinned expressions list.

Remove expressions

To remove an expression, click the The Close button.Close button next to it.

Last updated: Improve article

We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.