Special statement
This article is a series by Tomek Sułkowski published on Medium. According to the author revealed a total of 24 articles, updated until December 24, the copyright of the original author.
The author recommended our Chinese translation on Twitter, screenshot at the end
The translator had already communicated with the author before the translation to get permission to translate the whole series. In order not to disturb your reading, the record of authorization is here
The body of the
In the 24 days leading up to the holiday season, I will be publishing a series of short articles on how to use development tools in a more interesting way. Yesterday we talked about a few tips from Newwork, and today we will continue with two other useful tips of drawers that we talked about the other day
Check the code coverage.
Your page doesn’t actually need a lot of code at the end. Maybe it’s a chunk of JavaScript from an external library, or maybe it’s some CSS rules on a forgotten selector that no longer matches anything.
Use the Coverage panel to get summary – details about redundant code. Use the Drawer menu or the Command menu to open it.
DevTools’ Coverage tool keeps track of which lines of currently loaded JS and CSS files are being executed and displays the percentage of unused bytes.
It is marked running with a green line and not running with a red line. Let’s look at a simple example:
66. Check what you’ve changed
Designing in a browser, adjusting these CSS values, and debugging where the code is executing – it’s both convenient and fun. But at some point, you may want to compare what has changed to the stylesheet that was originally loaded.
To do this, use the change tool located in the DevTools’ Drawer.
Not only does it show you changes in a different form (like a source control tool like Git), it also undoes them
Here’s an example:
That’s all for today’s sharing
Routine: If you learn something new from this
→ Follow me on Twitter: Tomek Sułkowski
Other series
Other articles in this series will be translated soon, with links posted here.
- Day 1: ‘$’ in the Console
- Tips you might not know about Chrome debugging tools Day 2: Copying & Saving
- Chrome debugging tools you didn’t know about
- The Chrome debugging tool has a few tricks you don’t know about.
- Day 5: Console log, puzzling case
- You don’t know the Command menu for Chrome
- 7. Fun tips you didn’t know about the Chrome Debugging Tool Consle
- Chrome’s Color picker is a Color picker that you don’t know about.
- Day 9: Time console
- Custom Formatters are custom formatters for Chrome.
- Today: Style Editors continued
- Tips you don’t know about the Chrome Debug Tool Day 12: Ninja Log Print! (the ninja logs)
- Chrome debugging Tool tips you didn’t know about
- Chrome Debugging Tool tips you didn’t know About day 14: Other shortcuts
- Chrome debugger tips you didn’t know about
- Tips you don’t know about Chrome debugging Tools 16: Breakpoints
- Day 17: Farewell to Console
- What you Didn’t know about Chrome Debug Tools
- Chrome debug tool tips you don’t know
- Tips you didn’t know about Chrome debugging tools Day 20: The dark arts of Workspace
- Tips you Don’t Know about Chrome Debugging Tools Day 21: Snippets
- Chrome Debugging Tool tips you didn’t know
- Chrome debug Tool tips you don’t know
- Day 24: The last day, New Year’s Day, is awesome
Write in the last
If you are sure of my translation, you can also pay attention to my wave oh ~ incidentally my open source project, for a wave of star→ see here, beautiful blog system