Home > headlines > Very useful new devtools features in Chrome92!

Very useful new devtools features in Chrome92!

藏色散人
Release: 2021-07-26 13:56:24
forward
3075 people have browsed it

Chrome 92——devtools new features

Chrome releases a new version every 6 weeks. Version 92 was released a few days ago. Let’s take a look at some of the new features!

CSS Grid editor

Elements of grid layout can manually modify attributes in style.

Very useful new devtools features in Chrome92!

css grid editor

Click on the icon behind display:grid to see some of the grid's layout attributes. Switching attributes can be directly applied to elements.

Secondary declaration of const in console

I used to write a script in the console and defined a const variable. After running it, if I run the script again, I will be prompted. :

Very useful new devtools features in Chrome92!

Identifier has already been declared

I am often interrupted by this during debugging, and I need to refresh the page before I can execute the script again. Now it can be executed directly without error, and it works just as well when running in Snippets!

Very useful new devtools features in Chrome92!

redeclaration of const

View the original order of elements

#The order in which elements are written in html can sometimes be displayed The order is inconsistent. Chrome has added a link between display and the order of elements. You can check Show Source Order in Accessibility to view the original order of elements.

Very useful new devtools features in Chrome92!

show source order

When you click on the parent element, you can see the serial number appearing on the child element.

Simulation focus

When debugging a similar search box before, I entered text, and then selected inspect to inspect the element from the options that appeared, and the drop-down box will disappear. When the drop-down box of some websites disappears, the elements will also disappear, which makes it impossible to debug the drop-down box generated by fuzzy matching. For example:

Enter keywords in the website search box, and matching search results appear, and then Right-click to select one of them and view this element in the dom.

Very useful new devtools features in Chrome92!

Enter the keyword

Very useful new devtools features in Chrome92!

The fuzzy matching result disappears

You can see that at this time , the fuzzy matching search results disappeared, and the DOM element also disappeared.

Chrome 92 now supports the "simulated focus" function by default. Even if an element is checked, it will not cause the element to disappear:

Very useful new devtools features in Chrome92!

Simulated focus

For front-end debugging, this is another good news! ! !

In fact, this setting can be turned on or off. Open the "Run Command" panel in devtools (can be opened in Settings More, or you can use the shortcut Command Shift P to open), enter "focus", and select "emulate a focused page":

Very useful new devtools features in Chrome92!

Enable emulate a focused page

and you can use it normally!

Chrome Devtools is a very powerful front-end debugging tool. I personally think it is the best at present. It has many functions. It is not just about checking web page elements and viewing requests. Interested students can go to the official website to learn more. characteristic.

Related labels:
source:Fun前端
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template