Chrome DevTools - 20+ Tips and Tricks

  Google Chrome is currently one of the most popular web browsers used by developers today. According to   StatCounter , as of September 201...

 

DevTools

Google Chrome is currently one of the most popular web browsers used by developers today. According to StatCounter, as of September 2019, Google Chrome holds 63.72% browser market share across the globe. The Chrome DevTools can greatly improve your workflow by helping you develop, test, and debug your websites right within your browser. Many of you probably use Chrome DevTools on a regular basis, but check out these additional tips and tricks to enhance your productivity.

What are the Google Chrome DevTools?#

The Google Chrome Developer Tools, also known as Chrome DevTools, are web authoring and debugging tools built right into the browser. They provide developers deeper access into their web applications and the browser. You can do everything from testing the viewport on a mobile device to editing a website on the fly, and even measuring the performance of an entire website or individual assets.

To use the latest version of the developer tools, you may want to use Chrome Canary, which is the experimental version of Chrome that is updated nightly. Chrome Canary can be run side by side with Chrome so you can check any issues that may arise.

google chrome canary

You can enhance your development by going to chrome://flags and enabling the Developer Tools experiments feature. You can then use the settings panel in developer tools to toggle individual experiments.

enable devtools experiments

We will be mentioning some of the Chrome DevTools keyboard shortcuts below, but you can see a full list of them on the Google Developer website.

Opening Chrome DevTools#

There are a few ways to open Chrome DevTools, which means you can use the method that works best for you.

Open from browser menu#

You can open Chrome DevTools from the Chrome menu. Go to More Tools and then click Developer Tools.

open chrome devtools

Open by right clicking#

You can also open Chrome DevTools from the right click menu. Right click on any page element and then click Inspect (or Inspect Element).

chrome inspect element

Open with keyboard shortcuts#

You can also use the following shortcuts:

  • Mac: Cmd + Opt + I
  • Windows: F12 or Ctrl + Shift + I

Tips and tricks#

Below are just a few of the hundreds of things you can do with Chrome DevTools. It also makes for a good crash course on the tools if you haven't used them before.

Quick file switching#

You can easily access any file within a current project or web page by pressing Cmd + P (Ctrl + P) when Chrome DevTools is open and searching for the name.

Pretty print#

Did you know Chrome DevTools has a pretty print featured built in? You can easily change the formatting of your minimized code by clicking on {}.

Edit HTML element#

You can edit HTML on the fly and preview the changes by selecting any element, choosing a DOM element within the panel, and double clicking on the opening tag to edit it. The closing tags are automatically updated for you. Any changes will show up in your browser as if the change had actually been made to the source code.

Edit CSS property#

Just like with editing HTML, you can also change CSS in Chrome DevTools and preview what the result will look like. This is probably one of the most common uses for this tool. Simply select the element you want to edit and under the styles panel you can add/change any CSS property you want.

Search source code#

You can quickly search all of your source code by pressing Cmd + Opt + F (Ctrl + Shift + F).

JavaScript breakpoints#

When debugging JavaScript it is sometimes useful to set breakpoints. You can set breakpoints in Chrome DevTools by clicking on the line number you want to break at then press Cmd + R (Ctrl + R) to refresh the page. The page will then run right to that breakpoint.

Go to line number#

You can automatically skip to a line in your code by pressing Cmd + O (Ctrl + O) and using the line syntax. In the example below we entered :375:18 to go to line 375, column 18.

Multiple cursors#

Ever have multiple lines you need to add something to? You can easily add multiple cursors by pressing Cmd + Click (Ctrl + Click) and entering information on multiple lines at the same time.

Dock position#

You can also change the Chrome DevTools dock position. You can either undock into a separate window, or dock it on the left, bottom, or right side of the browser. The dock position can be changed by pressing Cmd + Shift + D (Ctrl + Shift + D) or through the menu.

Clear cookies#

You can also easily clear cookies from the Chrome DevTools. This can be especially useful when testing and debugging third party plugins. In the Application panel go to Storage > Cookies to either clear all cookies or an individual cookie.

Device mode#

You can test your website and media queries to see if your responsive design is breaking anywhere by going into device mode. Or perhaps you need to see at what resolution the page is breaking at so you know where to apply a media query.

To enter device mode click on the small phone and tablet icon in Chrome DevTools or press Cmd + Shift + M (Ctrl + Shift + M). You can then choose what device and resolution to emulate, add a network throttle, and even define the device orientation.

Color palette and picker#

The custom color palette will pull from the website style sheet. You can access them by simply clicking on the color block in the style panel. There is also a color picker that can be used to pick out colors from a web page directly.

Change color format#

You can toggle between RGBA, HSL, and hexadecimal formatting by pressing Shift + Click on the color block.

Toggle element state#

Have you ever tried to figure out where a hidden style is coming from, say the :hover selector? In Firefox Developer Tools you can see this when selecting the element, but not in Chrome DevTools. However, there is something better, called Toggle Element State. This allows you to force an element state, like :hover, so that you can then use the styles panel to see the properties.

Copy image as data URI (base64 encoded)#

You can save any image from a webpage out as a data URI or rather base64 encoded. There is no need to use a free online converter as it is already built into Chrome DevTools. In the Network panel click on an image and then right click on it to have the option to Copy image as data URI.

You will get the image in the following format:

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAIAAADdvvtQAAAgNklEQVR42u2dd5gVZZbG/WNn1dmdWXdmNu88O7uz7uzO7jozKiqCSFJERUQFBARBRAREcm5yzlmBBprcQJNBck6SY5MbJOfO+XY3d39wd3qaqltfV9X9qm71vd/31OMfcu/tCm+d75z3vOecJ...

Network filmstrip#

The network filmstrip feature allows you to see how your page renders from start to finish by grabbing screenshots throughout the loading process. This can be a great way to see how your font is rendering and if you're dealing with issues such as FOIT or FOUT.

In the Network panel click on the settings icon, check the Capture screenshots option, and then press Cmd + R (Ctrl + R) to refresh the page. After the page has refreshed it will show you how your page rendered from start to finish.

Monitor performance#

The performance feature allows you to easily see what is costing you the most time and resources. The performance details can be broken down in many different ways, such as the time, activity, and source.

In the Performance panel press Cmd + E (Ctrl + E) and then Ctrl + R (Cmd + R) to refresh the page. Record the amount of time that you want to be monitored. You can then click Stop and evaluate the results.

DOMContentLoaded#

We have a great article on blocking the DOM and how to fix it. This feature allows you to see the exact DOMContentLoaded time and total load time. Checking these values can be beneficial in improving the overall performance of your website or application.

In the Network panel click on the settings icon, check the Show overview option, and then press Cmd + R (Ctrl + R) to refresh the page. A blue line will show up for DOMContentLoaded and a red line for total load time. Normally everything that is left of or touching the blue line are assets that are blocking the DOM, or also referred to as render blocking resources.

Network throttling profiles#

You can now also add custom networking throttling profiles. This can be beneficial if you are wanting to test more accurately at a specific speed.

In the Network panel click the Throttle drop down and then Add.... In the Network Throttling Profiles click Add custom profile... and add the profile with your specifications.

Security check#

The Security panel can be very useful to check if the SSL/TLS certificate is valid, whether or not the connection is secure, and if all resources are served securely. This is great for for debugging HTTPS migrations and quickly fixing mixed content warnings.

In the Security panel press Cmd + R (Ctrl + R) to refresh the page. It will then display the relevant security information.

Validating Google AMP HTML#

Google AMP is an open source initiative to speed up the web using lightweight HTML pages. For Google to index the AMP version of your page you must make sure it is validated.

In the Console panel append #development=1 to the AMP version in your browser's address bar and then press Cmd + R (Ctrl + R) to refresh the page. It will display if it successfully validated below. Read more about AMP validation errors.

Summary#

As you can see Chrome DevTools has numerous features to help you develop better, debug faster, and measure more efficiently the performance of your website or application. The tips mentioned above are just a few of the many features available. Do you have a favorite DevTools feature that we missed? If so, let us know in the comments below.

  • Read more in-depth about Chrome DevTools on the official Google Developers page.
  • Subscribe for Chrome DevTools updates on their web update page.
Name

About US,1,activate,1,ADDMEFAST,1,AdLinkFly,1,Adobe Illustrator,1,Adsense,17,ANALISA WEB,1,android,39,anonymous-surfing,1,Aplikasi,40,Artikel,11,Backlink,7,Backlinks,20,Backup,1,BBM,5,beginners,1,Best 140+ Do-follow Web 2.0,1,Best 59+ Free Ping Submission Sites For Faster Indexing,1,Best High DA Dofollow Blog Commenting,1,BIN,1,Blog,27,Blog Design,2,Blogger,1,Blogspot,3,Bounce Rate,1,Canva pro,1,CDN,1,Chrome,1,Copy Artikel,1,cPanel,1,crack,2,darknet,1,darkweb,1,Desain,1,DevTools,1,DIGITAL MARKETING,1,Disposable E-mail Free,1,Disqus,1,domain,1,download,2,DropMyLink,1,Dunia Kampus,1,e-books,1,EDU BACKLINKS,5,Envato Elements,1,Express Vpn Premium Account,1,FAQ SCHEME PAGE,1,Followers,1,Footer,1,free,1,Free Courses,2,Free Credits,1,Free Image Submission Sites,1,free methods,1,Free Profile Creations Sites List 2020-2021,1,Free RDP,1,Free Video Submission Sites List 2020-2021,1,freelancing,1,Gadget,7,giveaway,1,Gmail,2,Google,3,GOOGLE ADS,1,Google Adsense,2,GOOGLE ANALYTICS,1,Google Dork,1,google drive,2,Google My Business Customer Reviews,1,GOOGLE SEARCH ENGINE,1,GoogleNews,1,Grammarly Premium Cookies,1,guide,2,Guides,1,Header,3,High Authority Blog Submission Sites List,1,High DA/PA PPT Submission Sites List 2020-2021 for SEO,1,hosting,1,Hotstar Premium,1,How To,1,How to Activate,3,HTML,5,IDM,1,Info Blog,11,Info Google,13,Inspirasi,5,Instagram,4,internet,1,Jejaring Sosial,12,JNews,1,JSON-LD,1,Kapita Selekta,3,Komentar,8,Komputer,11,Kurikulum 2013,2,Label,3,learning,1,LINE,3,Link,14,LINK BUILDING,1,Lynda,1,Lynda.com,1,Majalah Wanita Online,1,MENINGKATKAN SEO WORDPRESS,1,Menu,2,MICRODATA SEO,1,MultCloud,1,multi cloud management,1,MyThemeShop,1,Netflix Accounts,1,News,38,newsmag,1,newspaper,1,Noor theme,1,Nord Vpn Premium Account In April 2020,1,NORD VPN PREMIUM ACCOUNTS,1,On Page SEO,8,online shop,1,Opini,10,OVHcloud,1,Page Speed,1,Pagerank,8,PDF Submission,3,PDF Submission Sites,1,Pembelajaran,4,Pixelyoursite,1,plugin,1,plugins,2,post views,1,Posting,10,Premium cookies,1,Privacy Policy,1,Produk,1,proxy,1,PVANISH PREMIUM ACCOUNT,1,reset-password,1,Review,52,RSS,1,RSS Feed Submission Sites List 2020-2021,1,Schema,1,Search Engine,4,SEARCH QUALITY RATERS,1,Secret Hacks,1,SEF,8,seo,98,SEO Tools,3,SEO WORDPRESS,1,Settings,1,Shopify,1,Shopping,1,Shortcode,1,Sidebar,2,social media,14,SoundCloud,1,Spam,1,Spotify,1,Spotify Premium Accounts,1,STM Forum,1,Submission,1,tagdiv,1,Template,9,themes,2,Tips,3,Tips & Tricks,17,TIPS DAN TRIK,2,tips-tricks,4,Tokoh,1,Tools,10,Tricks,9,Trik,1,umum,1,VPS,1,Web 2.O Sites List 2020,1,Web Hosting,2,Webmaster Tools,6,Website,3,WhatsApp,16,Widget,10,windows,1,Windows 11,1,wordpress,23,WORDPRESS & WOOCOMMERCE TUTORIALS,1,WP Rocket,1,youtube,18,YouTube 2021,1,
ltr
item
Trik.My.ID - Trik dan Tips Untuk Semuanya: Chrome DevTools - 20+ Tips and Tricks
Chrome DevTools - 20+ Tips and Tricks
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-dKPSB0ehHJwzJdZZdN8_6SrfWQPtrXqDk7-RruQvbsGoQ752kO7TdJGqFBxYhF-AL8vlRrVo1c9rVAQlVfHHcxI4fU8A88zheHHFrNFTGAhoe_nOTsAHFe86j-5qDtD21Ll84Q-kTy4i3e6AqW4sWqMS8P9UzdVkXI65U0ZtvhUoDxSue7sNhjt8RQ/w640-h320/web-development-tools.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-dKPSB0ehHJwzJdZZdN8_6SrfWQPtrXqDk7-RruQvbsGoQ752kO7TdJGqFBxYhF-AL8vlRrVo1c9rVAQlVfHHcxI4fU8A88zheHHFrNFTGAhoe_nOTsAHFe86j-5qDtD21Ll84Q-kTy4i3e6AqW4sWqMS8P9UzdVkXI65U0ZtvhUoDxSue7sNhjt8RQ/s72-w640-c-h320/web-development-tools.png
Trik.My.ID - Trik dan Tips Untuk Semuanya
https://www.trik.my.id/2022/06/chrome-devtools-20-tips-and-tricks.html
https://www.trik.my.id/
https://www.trik.my.id/
https://www.trik.my.id/2022/06/chrome-devtools-20-tips-and-tricks.html
true
3610684226484108978
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content