Overview Open Chrome DevTools What's New In DevTools DevTools Engineering Get Started With Viewing And Changing The DOM Find Unused JavaScript And CSS With The Coverage Tab Find and fix problems with the Issues tab Run commands in the Command Menu View and debug media players information Emulate authenticators and debug WebAuthn Edit files with Workspaces Debug Progressive Web Apps Understand security issues Keyboard shortcuts View page resources
Overview Open Chrome DevTools What's New In DevTools DevTools Engineering Get Started With Viewing And Changing The DOM Find Unused JavaScript And CSS With The Coverage Tab Find and fix problems with the Issues tab Run commands in the Command Menu View and debug media players information Emulate authenticators and debug WebAuthn Edit files with Workspaces Debug Progressive Web Apps Understand security issues Keyboard shortcuts View page resources

Watch JavaScript values in real-time with Live Expressions

Published 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 #

  1. Open the Console.

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

    Typing document.activeElement into the Live Expression text box.

    Figure 1 Typing document.activeElement into the Live Expression text box.

  3. Type Control+Enter or Command+Enter (Mac) to save the expression, or click outside of the Live Expression text box.

Last updated: Improve article

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