Quantcast
Channel: Updates
Viewing all articles
Browse latest Browse all 599

What's New In DevTools (Chrome 72)

$
0
0

What's New In DevTools (Chrome 72)

Note: We'll publish the video version of this page in early February 2019.

New features and major changes coming to Chrome DevTools in Chrome 72 include:

Visualize performance metrics

After recording a page load, DevTools now marks performance metrics like DOMContentLoaded and First Meaningful Paint in the Timings section.

First Meaningful Paint in the Timing section
Figure 1. First Meaningful Paint in the Timing section

Highlight text nodes

When you hover over a text node in the DOM Tree, DevTools now highlights that text node in the viewport.

Highlighting a text node
Figure 2. Highlighting a text node

Copy JS path

Suppose you're writing an automation test that involves clicking a node (using Puppeteer's page.click() function, perhaps) and you want to quickly get a reference to that DOM node. The usual workflow is to go to the Elements panel, right-click the node in the DOM Tree, select Copy > Copy selector, and then pass that CSS selector to document.querySelector(). But if the node is in a Shadow DOM this approach doesn't work because the selector yields a path from within the shadow tree.

To quickly get a quickly get a reference to a DOM node, right-click the DOM node and select Copy > Copy JS path. DevTools copies to your clipboard a document.querySelector() expression that points to the node. As mentioned above, this is particularly helpful when working with Shadow DOM, but you can use it for any DOM node.

Copy JS path
Figure 3. Copy JS path

DevTools copies an expression like the one below to your clipboard:

document.querySelector('#demo1').shadowRoot.querySelector('p:nth-child(2)')

Audits panel updates

The Audits panel is now running Lighthouse 3.2. Version 3.2 includes a new audit called Detected JavaScript libraries. This audit lists out what JS libraries Lighthouse has detected on the page. You can find this audit in your report under Best Practices > Passed audits.

Detected JavaScript libraries
Figure 4. Detected JavaScript libraries

Also, you can now access the Audits panel from the Command Menu by typing Lighthouse or PWA.

Typing 'lighthouse' into the Command Menu
Figure 5. Typing lighthouse into the Command Menu

Feedback

To discuss the new features and changes in this post, or anything else related to DevTools:

  • File bug reports at Chromium Bugs.
  • Discuss features and changes on the Mailing List. Please don't use the mailing list for support questions. Use Stack Overflow, instead.
  • Get help on how to use DevTools on Stack Overflow. Please don't file bugs on Stack Overflow. Use Chromium Bugs, instead.
  • Tweet us at @ChromeDevTools.
  • File bugs on this doc in the Web Fundamentals repository.

Consider Canary

If you're on Mac or Windows, consider using Chrome Canary as your default development browser. Canary gives you access to the latest DevTools features.

Note: Canary is released as soon as its built, without testing. This means that Canary breaks about once-a-month. It's usually fixed within a day. You can go back to using Chrome Stable while Canary is broken.

Previous release notes

See the devtools-whatsnew tag for links to all previous DevTools release notes.


Viewing all articles
Browse latest Browse all 599

Trending Articles