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

What's New In DevTools (Chrome 79)

$
0
0

What's New In DevTools (Chrome 79)

New features for cookies

After recording network activity, select a network resource and then navigate to the updated Cookies tab to understand why that resource's request or response cookies were blocked. See Changes to the default behavior without SameSite to understand why you might be seeing more blocked cookies in Chrome 76 and later.

The Cookies tab.
The Cookies tab.
  • Yellow Request Cookies were not sent over the wire. These are hidden by default. Click show filtered out request cookies to show them.
  • Yellow Response Cookies were sent over the wire but not stored.
  • Hover over More Information info to learn why a cookie was blocked.
  • Most of the data in the Request Cookies and Response Cookies tables comes from the resource's HTTP headers. The Domain, Path, and Expires/Max-Age data comes from the Chrome DevTools Protocol.

Chromium issues #856777, #993843

Click a row in the Cookies pane to view the value of that cookie.

Viewing the value of a cookie.
Viewing the value of a cookie.

Note: The main difference between the Cookies tab in the Network panel and the Cookies pane in the Application panel is that the Cookies pane in the Application panel lets you edit and delete cookies.

Chromium issue #462370

Simulate different prefers-color-scheme and prefers-reduced-motion preferences

The prefers-color-scheme media query lets you match your site's style to your user's preferences. For example, if the prefers-color-scheme: dark media query is true, it means that your user has set their operating system to dark mode and prefers dark mode UIs.

Open the Command Menu, run the Show Rendering command, and then set the Emulate CSS media feature prefers-color-scheme dropdown to debug your prefers-color-scheme: dark and prefers-color-scheme: light styles.

When the 'prefers-color-scheme: dark' option is set in the Rendering tab
            the Styles pane shows the CSS that gets applied when that media query is true
            and the viewport shows the dark mode styles.
When prefers-color-scheme: dark is set (middle box) the Styles pane (right box) shows the CSS that gets applied when that media query is true and the viewport shows the dark mode styles (left box).

You can also simulate prefers-reduced-motion: reduce using the Emulate CSS media feature prefers-reduced-motion dropdown next to the Emulate CSS media feature prefers-color-scheme dropdown.

Chromium issue #1004246

Code coverage updates

The Coverage tab can help you find unused JavaScript and CSS.

The Coverage tab now uses new colors to represent used and unused code. This color combination is proven to be more accessible for people with color vision deficiencies. The red bar on the left represents unused code, and the bluish bar on the right represents used code.

The new URL filter text box lets you filter out patterns of URLs.

The Coverage tab.
The Coverage tab.

The Sources panel now displays code coverage data by default. Clicking the red or bluish marks next to the line number opens the Coverage tab and highlights the file.

Coverage data in the Sources panel.
Coverage data in the Sources panel. Line 8 is an example of unused code. Line 11 is an example of used code.

Chromium issues #1003671, #1004185

Debug why a network resource was requested

After recording network activity, select a network resource and then navigate to the Initiator tab to understand why the resource was requested. The Request call stack section describes the JavaScript call stack leading up to the network request.

The Initiator tab.
The Initiator tab.

Note: You can also access this data by hovering over the Initiator column in the Network Log. We added the Initiator tab because it's more accessible.

Chromium issues 963183, 842488

Console and Sources panels respect indentation preferences again

For a long time DevTools has had a setting to customize your indentation preference to 2 spaces, 4 spaces, 8 spaces, or tabs. Recently the setting was essentially useless because the Console and Sources panels were ignoring the setting. This bug is now fixed.

Go to Settings > Preferences > Sources > Default Indentation to set your preference.

Chromium issue #977394

New shortcuts for cursor navigation

Press Control+P in the Console or Sources panels to move your cursor to the line above. Press Control+N to move your cursor to the line below.

Chromium issue #983874

Feedback

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

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.

<<../../_shared/discover.md>>


Viewing all articles
Browse latest Browse all 599

Trending Articles