What's New In DevTools (Chrome 79)
New features for cookies #
Debug why a cookie was blocked #
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.
- 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 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.
View cookie values #
Click a row in the Cookies pane to view the value of that 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.
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
Timezone emulation #
The Sensors tab now lets you not only override geolocation, but also emulate arbitrary timezones and test the impact on your web apps. Perhaps surprisingly, this new feature improves the reliability of geolocation emulation as well: previously, web apps could detect location spoofing by matching the location against the user's local timezone. Now that geolocation and timezone emulation are coupled, this category of mismatches is eliminated.
Code coverage updates #
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 Coverage tab.
The Sources panel displays code coverage data when it is available. 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. Line 8 is an example of unused code. Line 11 is an example of used code.
Debug why a network resource was requested #
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.
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