SpyreStudios

Web Design and Development Magazine

  • Design
  • Showcase
  • Inspirational
  • Tutorials
  • CSS
  • Resources
  • Tools
  • UX
  • More
    • Mobile
    • Usability
    • HTML5
    • Business
    • Freebies
    • Giveaway
    • About SpyreStudios
    • Advertise On SpyreStudios
    • Get In Touch With Us

Getting Started with Chrome Developer Tools: Advanced DevTools

March 19, 2018 by Alex Fox

The most common tool in Chrome Developer Tools is Inspect Element. As we’ve covered, this tool allows you to view the CSS and HTML associated with specific on-screen elements. But there’s more power than that within DevTools. You can also access additional tools to do far more. You can debug JavaScript, monitor network performance, preview media queries and control cookies. And there’s even more than just that! Google lists dozens of functions within DevTools. We’ll look at some of the most useful and popular advanced functions within Chrome Developer Tools.

Using the JavaScript Debugger

Visiting the Console

Console is probably the second-most commonly-used part of Chrome’s Developer Tools. Using Console, you can view messages posted by your code.

Viewing JavaScript

With the debugger, you can view and adjust your JavaScript in detail. You can learn more about Chrome’s debugger in our introduction.

1. Click on the Sources tab in Chrome Developer Tools.

chrome developer tools

2. Select the appropriate JavaScript file from the left-hand menu pane.

chrome developer tools

3. JavaScript is often minified before deployment, making it hard to read. If necessary, click the Pretty Print button to de-minify the code.

chrome developer tools
chrome developer tools

Setting Debugging Breakpoints

Breakpoints are used to “pause” the execution of your code at a certain point. Set a breakpoint, then move through your code gradually to see why things aren’t working as expected.

1. Click on the “Sources” tab

2. Select the correct JavaScript file from the menu pane.

3. Click on a line number to set a breakpoint at that line.

chrome developer tools

Using Conditional Breakpoints

Conditional breakpoints will only trigger when certain conditions are met.

chrome developer tools

1. Right click on a line number.

2. Select “Add Conditional Breakpoint” from the context menu.

3. Enter your conditions in the dialog.

4. Press “Enter” to activate the breakpoint.

Emulate Devices

Set Media Queries

As covered previously, the Device Toolbar can be used to change the viewport size and emulate smaller devices. You can adjust specific pixel dimensions as well as the device pixel ratio to preview appearance. Common devices can be selected from the drop down to test specific devices.

1. Click the Device Toolbar icon or press Command + Shift + M (Mac) or Control + Shift + M (Windows).

2. Adjust viewpoint values directly.

3. Click “Reponsive” to view device presets.

Network Throttling

Use the “Online” dropdown to emulate various network conditions. This helps simulate poor connectivity or slower connections.

Emulating Sensors

If your site is responsive to accelerometer or geolocation values, you can emulate those device sensors from within Chrome Developer Tools.

1. While in the Elements panel, press the “Escape” key to open the Console Drawer.

2. Click the menu dots and choose “Sensors.”

3. Click the dropdown to select a geographic location, or select “Custom location” and enter specific GPS coordinates.

4. Click the dropdown to select a device orientation, or select “Custom orientation” and enter your own degree values.

 

Monitor Network and Performance

We can use DevTools to monitor network performance and bandwidth utilization. This can help us get a sense of what’s slowing down our site and how to improve our performance.

Network Filmstrip

The filmstrip will capture screenshots of your webpage as it loads. This will help record the elements that have been loaded so far, making it easier to understand what the site resources are loading.

1. Click on the Network tab.

2. Click on the camera icon.

3. Press Command + R (Mac) or Control + R (Windows) to reload the web page and capture the filmstrip.

4. Review the results below. Double-click on an image to zoom in and see what elements have loaded at that point.

Analyze Site Performance

The performance tab captures more than the loading order. This lets you analyze frames per second and CPU load, finding bottlenecks more quickly.

1. Click on the Performance Tab.

2. Click the “Reload” icon to reload the page and record performance characteristics.

3. Wait for the performance recording to finish.

4. Review the performance results and graph.

You can also record mid-page performance for web application. Click the “Record” icon to arbitarily capture performance data (click Stop when you’re done.) This will record animation performance, letting you capture results with user input without reloading the page.

View Local Storage and Cookies

Viewing Cookies

1. Click on the Applications tab.

2. Navigate the sidebar to find the “Cookies” dropdown.

3. Disclose the cookies list and select a cookie to view.

Set Dark Mode

1. Click the menu dots.

chrome developer tools

2. Choose the “Settings” menu.

chrome developer tools

3. Select “Dark” under Theme in Appearance.

chrome developer tools

Honorable Mention: Changing Content

While it’s useful to adjust your HTML on the fly, you can also have some fun with it. It’s easy to adjust site content as well, meaning you can create fake news stories and fake headlines while maintaining the parent site’s styling rules. Talk about Fake News.

1. Double-click on an HTML element to edit it.

2. Type your new content.

3. Profit?

Conclusion

There’s even more you can do with the Chrome Developer Tools. Examine Google’s own documentation to see what kind of power is available to you.

You might also like the following posts:

The Powerful JavaScript Debugger You Never Knew You Had

Getting Started with Chrome Developer Tools: Inspect Element

Filed Under: Development, Tutorial Tagged With: developer tools, development, Google Chrome, web development

Recent Posts

  • 31 Fresh Design Elements for Spring and Easter
  • 10 Templates for Music Concert Flyers
  • How to Build a Web Scraper Using Node.js
  • Best PHP Books, Courses and Tutorials in 2022
  • How to Get Your First Web Design Client

Archives

  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • January 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • October 2013
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • July 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • May 2008
  • April 2008

Categories

  • Accessibility
  • Android
  • Apps
  • Art
  • Article
  • Blogging
  • Books
  • Bootstrap
  • Business
  • CSS
  • Design
  • Development
  • Ecommerce
  • Fireworks
  • Flash
  • Freebies
  • Freelance
  • General
  • Giveaway
  • Graphic Design
  • HTML5
  • Icons
  • Illustrator
  • InDesign
  • Infographics
  • Inspirational
  • Interview
  • Jobs
  • jQuery
  • Learning
  • Logos
  • Matrix
  • Minimalism
  • Mobile
  • Motion Graphics
  • Music
  • News
  • Photoshop
  • PHP
  • Promoted
  • Rails
  • Resources
  • Showcase
  • Tools
  • Tutorial
  • Twitter
  • Typography
  • Uncategorized
  • Usability
  • UX
  • Wallpapers
  • Wireframing
  • WordPress
  • Work

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

SpyreStudios © 2022