70 Firefox DevTools Tips
-
Jump from a label `for` attribute to the linked input (and more)
In Firefox, you can jump from an element that references the ID attribute of an other element, to th...
Read more
Categories:
Supported by:
-
Edit an element's attributes and tag name with the keyboard
Using the keyboard can be faster than using a mouse in certain cases (and for some people). One such...
Read more
Categories:
Supported by:
-
Create your own simulated devices
You can simulate various different devices from DevTools, to get an idea of how your webpage might r...
Read more
Categories:
Supported by:
-
Discover all the tools
DevTools is confusing! There's so much functionality packed in such a small UI. Did you know that Ch...
Read more
Categories:
Supported by:
-
Use document.designMode to spell check your webpage
https://twitter.com/AmeliasBrain/status/1521146127327801345...
Read more
Categories:
Supported by:
-
Visualize and debug CSS cascade layers
CSS cascade layers is a CSS feature that allows web developers to define their CSS styles in multipl...
Read more
Categories:
Supported by:
-
Quickly reference nodes, expressions, and react components in the console
https://twitter.com/ChatterboxDev/status/1506299424712142864
Also learn more about getting the selec...
Read more
Categories:
Supported by:
-
Start your HTML and CSS prototypes in the browser directly
Sometimes I need a blank canvas to prototype an idea with HTML and CSS. Something outside of the web...
Read more
Categories:
Supported by:
-
Debug popups that appear on hover using the debugger statement
In Debug popups that appear on hover using JS we described how to pause the debugger to inspect popu...
Read more
Categories:
Supported by:
-
console.log() is great, but do you know console.table()? console.group()? console.assert()?
https://twitter.com/nghuuphuoc/status/1505892172700299268...
Read more
Categories:
Supported by:
-
Debug unwanted scrollbars
Sometimes scrollbars appear on a web page in places we don't want them to. And when this happens, it...
Read more
Categories:
Supported by:
-
Debug CSS grid areas
A really useful way to position elements on a CSS grid is using the grid-template-areas property. Wi...
Read more
Categories:
Supported by:
-
Send feedback, ask for features and report bugs
Browser vendors depend on your feedback to build the right tools for you. Without hearing from you...
Read more
Categories:
Supported by:
-
Manipulate complex JSON files using DevTools
I often work with large amount of data that I need to go through and gather interesting information...
Read more
Categories:
Supported by:
-
Detect low color contrast issues
Low color vision is very common, and your choice of text and background colors can negatively impact...
Read more
Categories:
Supported by:
-
Paste multiple CSS declarations at once
You know how you can paste a CSS property name or value in the Styles (or Rules) panel? Well, you ca...
Read more
Categories:
Supported by:
-
Use full browser window for device emulation
Emulating different devices in the browser is incredibly useful. It gets tricky when you are on a de...
Read more
Categories:
Supported by:
-
Remove or disable event listeners
When you're trying to debug something and event listeners on the page keep interfering with what you...
Read more
Categories:
Supported by:
-
Find HTML parsing errors
DevTools is so full of features these days that we hardly ever use View-Source anymore. But it turns...
Read more
Categories:
Supported by:
-
Select elements with pointer-events:none by holding Shift
When selecting elements from the page they normally get highlighted on hover and selected on click....
Read more
Categories:
Supported by:
-
Write code on multiple lines in the Console
If you're feeling adventurous and want to write longer pieces of code in the Console to execute more...
Read more
Categories:
Supported by:
-
Download all images from the page
If you want to download all of the images on a webpage in one go, you can use the following few line...
Read more
Categories:
Supported by:
-
Edit and resend faulty network requests to debug them
When you're investigating a bug where the backend you connect to doesn't respond with the right thin...
Read more
Categories:
Supported by:
-
Visualize the effect of CSS transforms
CSS transforms can sometimes be hard to wrap your head around, especially when chaining multiple tra...
Read more
Categories:
Supported by:
-
Scroll an element into view
If the inspected web page is long with a lot of elements, and its DOM tree is big and complex, it's...
Read more
Categories:
Supported by:
-
Take a screenshot of a single node
In Firefox, Chrome, and Edge DevTools, you can screenshot a single node from the page.
Go to the El...
Read more
Categories:
Supported by:
-
Automatically logging name and value in console.log()
Using the console of DevTools you can to log some information to debug your JavaScript.
The common w...
Read more
Categories:
Supported by:
-
Move panels to re-arrange them
Moving panels around the user interface can be very useful to make DevTools more unique to you and a...
Read more
Categories:
Supported by:
-
Format console messages
You can use special formatters in the console.log function to format logs just the way you want.
Us...
Read more
Categories:
Supported by:
-
Simulate pseudo CSS classes
If you use :hover, :active, and other such pseudo-classes in CSS, you can actually simulate these st...
Read more
Categories:
Supported by:
-
Zoom the DevTools UI to your liking
Do you find the UI of DevTools too small to comfortably work with? Because this UI is made of HTML a...
Read more
Categories:
Supported by:
-
Easily change CSS number values from the keyboard in increments of 0.1, 1, 10, 100
When playing with styling or layout code in DevTools, it's useful to be able to change widths, margi...
Read more
Categories:
Supported by:
-
Find and export CSS changes
If you spent time changing CSS in DevTools, either in the Rules panel (in Firefox), or in the Source...
Read more
Categories:
Supported by:
-
Evaluate XPath to find elements in the page
DevTools supports 2 ways to evaluate XPath expressions to help you locate elements in the page. All...
Read more
Categories:
Supported by:
-
Store a node as a variable to use it in the console
If you want to use a DOM node from the page in the console:
Right-click the node in the Elements (o...
Read more
Categories:
Supported by:
-
Console.log() for the web with logpoints
Using the console to log some information is a very common way to debug your JavaScript. But you can...
Read more
Categories:
Supported by:
-
Debug popups that appear on hover using JS
Have you ever been frustrated because you couldn't style a popup or tooltip that appeared on hover?...
Read more
Categories:
Supported by:
-
Pause script execution when the DOM changes
If you want to know what JavaScript code removes, adds, or modifies a DOM element in the page, you c...
Read more
Categories:
Supported by:
-
Convert color formats
Colors in CSS can be expressed in a number of different formats: keyword (e.g. blue), RGB, HSL, hexa...
Read more
Categories:
Supported by:
-
Change the color theme of DevTools
Chrome, Firefox and Safari all have a light and dark theme for their DevTools. Edge not only has tho...
Read more
Categories:
Supported by:
-
See formatted JSON responses
Firefox comes with a very nice JSON viewer that makes it easy to review responses from your server d...
Read more
Categories:
Supported by:
-
Block resources to test your site without CSS or JavaScript
The various resources loaded by your site aren't always guaranteed to reach your users when they vis...
Read more
Categories:
Supported by:
-
Prototype content changes with designMode
When creating or modifying a design prototype for the web, you may want to quickly edit content in t...
Read more
Categories:
Supported by:
-
Throttle the network speed to test your website on slower connections
While you may develop your website on a fast network connection at home or at work, your users may n...
Read more
Categories:
Supported by:
-
Edit CSS absolute and relative positions by dragging points in the page
Firefox features a position editor that lets you move elements in the page by drag and drop. This wo...
Read more
Categories:
Supported by:
-
Copy an element's XPath expression
You can easily copy an element's XPath expression from DevTools. This is useful if you need this exp...
Read more
Categories:
Supported by:
-
Convert font property units
Font CSS properties such as font-size, line-height or letter-spacing can be expressed in multiple di...
Read more
Categories:
Supported by:
-
Find DevTools reference documentation
If you want to learn more about what other tools exist in a browser, or what features a given tool p...
Read more
Categories:
Supported by:
-
Drag and drop nodes in the DOM tree
If you need to move nodes or elements around in the DOM tree, to re-order things in the page, you ca...
Read more
Categories:
Supported by:
-
Event listeners are suppressed when paused
This is not really a tip, but rather an interesting thing to be aware of when debugging JavaScript....
Read more
Categories:
Supported by:
-
Sample colors from the page
Being able to sample colors from the page is super useful. Firefox, Edge and Chrome all allow you to...
Read more
Categories:
Supported by:
-
Visualize the tabbing order on the page
Firefox has a dedicated accessibility inspector panel that, among other things, lets you visualize t...
Read more
Categories:
Supported by:
-
Apply CSS styles to console messages
The console.log output can be styled in DevTools using CSS.
console.log('%c Hello World', 'color: or...
Read more
Categories:
Supported by:
-
Find all images without alternative text
With HTML, you can add alternative text to images using the alt attribute. It can be used to add a t...
Read more
Categories:
Supported by:
-
Draw a box around all elements to debug your CSS and page structure
Simple, yet powerful, * { outline: 1px solid red; } is a useful debugging trick that helps understan...
Read more
Categories:
Supported by:
-
Find DOM elements from the console
$ and $$ are 2 functions you can use in the console to find elements in the page.
They are essential...
Read more
Categories:
Supported by:
-
Persist console messages across page navigations and reloads
By default, the messages displayed in the console get removed as soon as you refresh the page (or na...
Read more
Categories:
Supported by:
-
Simulate color vision deficiencies
People who visit your web pages may have different types of color vision deficiencies that, if you i...
Read more
Categories:
Supported by:
-
Edit clip-path and shape-outside CSS properties by dragging points in the page
The clip-path property is a great way to change the final shape of an element and give it the shape...
Read more
Categories:
Supported by:
-
Copy an object from the console
The console panel supports a very handy copy() function that stringifies and copies anything you pas...
Read more
Categories:
Supported by:
-
Get the selected element in the console
If you selected an element in the Elements panel (in Chrome, Safari or Edge) or the Inspector panel...
Read more
Categories:
Supported by:
-
Find your web component's custom element code
In Firefox, when inspecting elements (in the Inspector panel), you can click on the custom badge to...
Read more
Categories:
Supported by:
-
Filter requests in the Network panel by status code, mime type and more
The Network panel lets you filter requests by status code, or mime type, and more.
Click in the fil...
Read more
Categories:
Supported by:
-
Switch DevTools to another language
If you want to use DevTools in another language than English, you can do it in Edge and Firefox.
In...
Read more
Categories:
Supported by:
-
Unminify JavaScript code to easily read and debug it
Sometimes, the JavaScript code that runs on a website is minified and really hard to read. This is c...
Read more
Categories:
Supported by:
-
Highlight all the elements that a CSS rule matches
When you want to know which elements a given CSS rule will apply to, in addition to the currently se...
Read more
Categories:
Supported by:
-
Find inactive CSS styles
Firefox has a unique feature that helps find CSS styles that don't have any effect on the page.
This...
Read more
Categories:
Supported by:
-
Expand DOM nodes recursively
You can expand all descendants under a given DOM node in one go, to avoid having to expand each node...
Read more
Categories:
Supported by:
-
Edit CSS filters
The filter property in CSS lets you change the way a particular element gets rendered.
Firefox provi...
Read more
Categories:
Supported by:
-
Use the debugger statement to pause script execution
If you prefer to use console.log() statements rather than the JavaScript debugger because you find i...
Read more
Categories:
Supported by: