{"componentChunkName":"component---src-templates-post-js","path":"/blog/2019/08/08/firefox-dev-tools/","result":{"data":{"post":{"html":"<p>It’s been a while since one of the X can do that posts I’ve been publishing. Furthermore, <a href=\"https://developer.mozilla.org/en-US/docs/Tools\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Firefox Developer tools</a> is just getting better and better everyday, so I thought it’s about time I write one for it.</p>\n<p>So, are you ready? 😎</p>\n<!--more-->\n<h2 id=\"how-to-open-it\" style=\"position:relative;\"><a href=\"#how-to-open-it\" aria-label=\"how to open it permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>How to open it</h2>\n<p>You can open the <em>Firefox Developer Tools</em> from the menu by selecting <em>Tools</em> > <em>Web Developer</em> > <em>Toggle Tools</em> or use the keyboard shortcut <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>I</kbd> or <kbd>F12</kbd> on Windows and Linux, or <kbd>Cmd</kbd> + <kbd>Opt</kbd> + <kbd>I</kbd> on macOS.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 225px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/7e201c1dea64888838c1bfc2a1f0fa5b/3684f/menu.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 128.88888888888889%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAaCAIAAAA44esqAAAACXBIWXMAAAsTAAALEwEAmpwYAAADSUlEQVR42n1UaVPjOBDN//8ZMF+omk+7FLCzGagaSG0xkMM5vImP+Iwdx/GpOLbla57tJARmly7RtBw99dPrljqE7MLws7HdOkEQBgFxHNe2HUnRNd0EareLOpRmWZa340NcFKXvB93ud8Mwq6q6ubldSvLzS3++ECRJFsVlJ44TQqJmpz1ieMQkrMeORJ7nr1aG4zjIo2n62rJlRVO1VRiSOjP+sIpSCrRhGPBpmoJARmvD/6Io8rxIkxTTOI4xxQKA05R2mjOH2FtV1YuLC3Y24xaLOTubc7wkLtnZdDAYTCdTx/HAvCxLeOABBs1OFO1h2Aw5X19focyOELDFjiQMfd93HddaW/t9fA5Gyjoz9AQZfFIUpdvt8hyHMxk6JDVc19U1lVtw0K86s2PmtJM0hk9gfn9/b9sbZ7td6dDGQm2WgsAt+JR+BIMsPEpFW7Asy4+Pj7qmmaZpWxtzbXm+L8vS+WlP4BbyBtY0rdfrmYahqYrI8yp4G6vZbOZ+Akap2giCPTw8rNcmyh2hftArIKgPNLM3GxJFJzzATUVpDW4F4zju6upqu9mMx8Pe0z+D/oBhJqIkjoejYb/P8QLNixP4oDbAsDxHP1IUDAF+K0uMgzv4ssyOhmWENE2C6EQbyfG1LUzZZMBep2ztFLvAgyyCN8Gm0+nF5SWaixmNBsOhokhPT0/MaCLw/GTMvPz8ifsQhgEakWb5QbA4XSQpQYQ5z/PwWZ4nMXzWcEvRgsjT6to2NjIfwZRNkgCRaRqXX74gITPq//jRYxhGWEq/FSk3Vjo9gf+6vbVtGxG2lyQJ3ve9IAgstIpt1yfM8vZiNUfO26vWFqjDT2PfQ6/lB52Qp2zkquOqlSc7M0zB/AAW/qUkTBGFrgOejrM1jRXuhqJq0lLUdT1JaPXe3jrsxYz9qI72O6KoilybJKAnltJ8zqJPN7Zzdur34OdV7DVglDskZI+OITtcGs9xQbL6L3sDi+yBdryPBH7B4u0YT1mWfXl+FkUJ6z4D85PUMvESJWGQei4Ki9bJ2iY9PmQfDUi8QTX472+3d3d/3t39gXF9/dXajNKM38c2Wheq0v+xllEH709VqcehlZVaVMuiDBqCZfWp/QIYWbwnut/aIwAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Firefox Developer Tools menu\"\n        title=\"\"\n        src=\"/static/7e201c1dea64888838c1bfc2a1f0fa5b/3684f/menu.png\"\n        srcset=\"/static/7e201c1dea64888838c1bfc2a1f0fa5b/3684f/menu.png 225w\"\n        sizes=\"(max-width: 225px) 100vw, 225px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<h2 id=\"page-inspector\" style=\"position:relative;\"><a href=\"#page-inspector\" aria-label=\"page inspector permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Page Inspector</h2>\n<p>There are many useful features in the page inspector (equivalent to Chrome DevTools inspect element), but there are a few which I use the most:</p>\n<h3 id=\"search-for-css-classes\" style=\"position:relative;\"><a href=\"#search-for-css-classes\" aria-label=\"search for css classes permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Search for CSS classes</h3>\n<p>You can use the search box right below the inspector tab to search for elements, classes and other selectors. But I mostly use it to search for elements with a specific class. This is very useful if you have multiple elements which visually look similar but have specific class, or if you can’t see it because it is hidden.</p>\n<p><img src=\"/b874d25602de8b85fb5d72d8944e9c9c/css-class-search.gif\" alt=\"CSS class search box\"></p>\n<h3 id=\"filter-styles\" style=\"position:relative;\"><a href=\"#filter-styles\" aria-label=\"filter styles permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Filter styles</h3>\n<p>In the section below, there is box for filtering styles which can be used to easily spot a particular style you might be looking for. The good thing is, it highlights the selectors and expands properties which lets you easily spot what you’re looking for.</p>\n<p><img src=\"/f5a3d6740361ac6d084301c7db987782/style-filter.gif\" alt=\"Search for styles in filter box\"></p>\n<h3 id=\"see-colour-codes-in-different-formats\" style=\"position:relative;\"><a href=\"#see-colour-codes-in-different-formats\" aria-label=\"see colour codes in different formats permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>See colour codes in different formats</h3>\n<p>One of my favourites is this little nugget of gold. With this you can easily <kbd>Shift</kbd> + <kbd>click</kbd> and see all different types of colour representation including <code class=\"language-text\">name</code>, <code class=\"language-text\">hex</code>, <code class=\"language-text\">rgb</code>, and <code class=\"language-text\">hsl</code>. Of course not all colours have names, you in some cases you only see the other ones.</p>\n<p><img src=\"/519a544dca2564e2c5891ef89f254bbd/colourrep.gif\" alt=\"Colour representation\"></p>\n<p>Cool hah?</p>\n<h2 id=\"web-console\" style=\"position:relative;\"><a href=\"#web-console\" aria-label=\"web console permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Web Console</h2>\n<p>Who doesn’t love the console in the browsers’s developer tools. It’s used for logging, calculation, evaluation and much more.</p>\n<h3 id=\"styling-console-messages\" style=\"position:relative;\"><a href=\"#styling-console-messages\" aria-label=\"styling console messages permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Styling console messages</h3>\n<p>You can get fancy with the messages in the console by applying CSS styles to them. This becomes important when you have heaps of logs and want to highlight a specific part by a different style for example.</p>\n<p><img src=\"/c98852ac8be49189f2a44d6f1ac3bb27/console-style.gif\" alt=\"Adding styles to console messages\"></p>\n<p>Note that you already have <code class=\"language-text\">console.info</code>, <code class=\"language-text\">console.warn</code> and <code class=\"language-text\">console.error</code> at your disposal. So this will be a level above what you can get with those.</p>\n<p><img src=\"/96fb71566bd9667b5a1ae0a9705c97da/console-msg.jpg\" alt=\"console info, warning and error messages\"></p>\n<h3 id=\"search-in-history-of-commands\" style=\"position:relative;\"><a href=\"#search-in-history-of-commands\" aria-label=\"search in history of commands permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Search in history of commands</h3>\n<p>This one is helpful if you have typed many commands and want to search between those commands. Simply type all or part of the command you’re looking for and it shows you all that matches that phrase.</p>\n<p>Press <kbd>F9</kbd> on windows or <kbd>CTRL</kbd> + <kbd>R</kbd> to open the search box. Then type your term and if the count on the right hand side shows you have results, you can move between those by pressing the <kbd>F9</kbd> and <kbd>SHIFT</kbd> + <kbd>F9</kbd> on windows. For Mac users, navigate between those using <kbd>CTRL</kbd> + <kbd>R</kbd> and <kbd>CTRL</kbd> + <kbd>S</kbd>.</p>\n<p><img src=\"/8efaad5bf616d8af11a6d08a4756be07/console-search.gif\" alt=\"search in console history\"></p>\n<p>PS: I am just using arrow keys because <kbd>F9</kbd> is mapped to pause and play on my recording software and I am just too lazy to change that 😁.</p>\n<h3 id=\"screenshot-of-the-whole-page\" style=\"position:relative;\"><a href=\"#screenshot-of-the-whole-page\" aria-label=\"screenshot of the whole page permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Screenshot of the whole page</h3>\n<p>To get a screen shot of the whole page, view port, or just an element, all you need to do is type <code class=\"language-text\">:screenshot</code> and pass the parameter you like. Combinations are:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"99208553938554240000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`:screenshot                           //the visible part of the page\r\n:screenshot --fullpage                // whole page even invisible parts\r\n:screenshot --selector .css-selector  // only one element (including its children)`, `99208553938554240000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\">:screenshot                           //the visible part of the page\r\n:screenshot <span class=\"token parameter variable\">--fullpage</span>                // whole page even invisible parts\r\n:screenshot <span class=\"token parameter variable\">--selector</span> .css-selector  // only one element <span class=\"token punctuation\">(</span>including its children<span class=\"token punctuation\">)</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span></span></pre></div>\n<p><img src=\"/98703d3a1343cc27253858545f50356e/screenshot.gif\" alt=\"taking a screenshot\"></p>\n<p>Find out more about other parameters you can pass to it <a href=\"https://developer.mozilla.org/en-US/docs/Tools/Taking_screenshots#Taking_screenshots_with_the_web_console\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">in the documentation</a>.</p>\n<p>And of course you can take the screenshots using photo icon on the left side of the console in the above picture too.</p>\n<h2 id=\"javascript-debugger\" style=\"position:relative;\"><a href=\"#javascript-debugger\" aria-label=\"javascript debugger permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>JavaScript debugger</h2>\n<p>Apart from the above two sections, like any other developer tools, is the debugger section where you could look into source code to see why something is happening the way it shouldn’t or just simply test out something.</p>\n<h3 id=\"pretty-print-minified-code\" style=\"position:relative;\"><a href=\"#pretty-print-minified-code\" aria-label=\"pretty print minified code permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Pretty print minified code</h3>\n<p>To prettify a minified file, click this icon: <code class=\"language-text\">{}</code> in the source pane. The debugger will format the source and display it as a new file with a name like: ”{ } [original-name]“.</p>\n<p><img src=\"/612c8fa42b081fefac862d958bae7769/pretty-print.gif\" alt=\"Pretty print minified code\"></p>\n<h3 id=\"search-for-filesfunctions\" style=\"position:relative;\"><a href=\"#search-for-filesfunctions\" aria-label=\"search for filesfunctions permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Search for files/functions</h3>\n<p>To search for a specific file, simply press <kbd>CTRL</kbd> + <kbd>P</kbd> (or <kbd>CMD</kbd> + <kbd>P</kbd> on a Mac). The display panel shows a list of files matching the search term as you type which you can choose. Just press <kbd>Enter</kbd> to open the file.</p>\n<p><img src=\"/d896579b21ae48757fc069fe487aadcf/search-file.gif\" alt=\"Searching for a file\"></p>\n<h3 id=\"xhr-xmlhttprequest-breakpoint\" style=\"position:relative;\"><a href=\"#xhr-xmlhttprequest-breakpoint\" aria-label=\"xhr xmlhttprequest breakpoint permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>XHR (XMLHttpRequest) breakpoint</h3>\n<p>Sometimes you need to figure out what happens when you visit/send a request to a particular URL. Once set and the URL is hit, the execution will stop so you can see the state of the application at that point.</p>\n<p>Just click on the <kbd>+</kbd> in the XHR breakpoint section or if you want to enable it for all URLs, just tick the ‘Pause on any URL’ checkbox.</p>\n<p><img src=\"/4bfcdd2487eb43d6146affb30b178147/urlbreakpoint.gif\" alt=\"URL breakpoint\"></p>\n<h2 id=\"performance-tool\" style=\"position:relative;\"><a href=\"#performance-tool\" aria-label=\"performance tool permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Performance tool</h2>\n<p>The performance tool is where I usually spending most of my time in. As you might know, I’ve been actively working on web performance and also have a <a href=\"https://dev.to/yashints/improve-html-and-css-performance-4o08\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">series of posts</a> on some important aspects of it.</p>\n<p>However for the purpose of keeping this post short (pardon the pun 😁), I will only point to two of the ones I regularly use. You can find out more about the rest in <a href=\"https://developer.mozilla.org/en-US/docs/Tools/Performance\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">the official docs</a>.</p>\n<h3 id=\"waterfall-tab\" style=\"position:relative;\"><a href=\"#waterfall-tab\" aria-label=\"waterfall tab permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Waterfall tab</h3>\n<p>Before you get to see these tabs, you should record a page’s load by pressing the ⏱ icon. Once it’s done, you will see the waterfall tab by default. Along the <code class=\"language-text\">X</code> axis is time.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1080px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/3b8a6a63aa08aadf6d97da5d75f3261e/d2757/waterfall.jpg\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 44.074074074074076%; position: relative; bottom: 0; left: 0; background-image: url('data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAJABQDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAUBAv/EABUBAQEAAAAAAAAAAAAAAAAAAAAB/9oADAMBAAIQAxAAAAHibUlmiz//xAAYEAADAQEAAAAAAAAAAAAAAAABBBAAAv/aAAgBAQABBQJwHmvYT//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQMBAT8BP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8BP//EABkQAAIDAQAAAAAAAAAAAAAAAAEQAgMicf/aAAgBAQAGPwKGieut/wD/xAAbEAACAgMBAAAAAAAAAAAAAAABEQAQITFxwf/aAAgBAQABPyFbLr4gyK95oK//2gAMAwEAAgADAAAAEEgf/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPxA//8QAFREBAQAAAAAAAAAAAAAAAAAAARD/2gAIAQIBAT8QJ//EAB8QAQACAQMFAAAAAAAAAAAAAAEAEVEQITFhcZGhwf/aAAgBAQABPxBzoGcNiiKlQusQDB4nPs+Z6Wn/2Q=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"waterfall tab in performance view of Firefox developer tools\"\n        title=\"\"\n        src=\"/static/3b8a6a63aa08aadf6d97da5d75f3261e/47311/waterfall.jpg\"\n        srcset=\"/static/3b8a6a63aa08aadf6d97da5d75f3261e/6f81f/waterfall.jpg 270w,\n/static/3b8a6a63aa08aadf6d97da5d75f3261e/09d21/waterfall.jpg 540w,\n/static/3b8a6a63aa08aadf6d97da5d75f3261e/47311/waterfall.jpg 1080w,\n/static/3b8a6a63aa08aadf6d97da5d75f3261e/0047d/waterfall.jpg 1620w,\n/static/3b8a6a63aa08aadf6d97da5d75f3261e/274e1/waterfall.jpg 2160w,\n/static/3b8a6a63aa08aadf6d97da5d75f3261e/d2757/waterfall.jpg 2701w\"\n        sizes=\"(max-width: 1080px) 100vw, 1080px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>As you can see, all sorts of the stuff which browser has done such as running JavaScript, updating layout, garbage collection, and so on is shown in the view. You can find out how your application is performing on load and what type of things take the most time to finish easily in this view.</p>\n<p>The good thing is that each category is coloured differently so you can spot them easily in each category.</p>\n<p>For a full reference of what each colour represents, refer to the <a href=\"https://developer.mozilla.org/en-US/docs/Tools/Performance/Waterfall#Markers\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">markers table on the docs</a>.</p>\n<h3 id=\"call-tree\" style=\"position:relative;\"><a href=\"#call-tree\" aria-label=\"call tree permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Call tree</h3>\n<p>You can see a call tree of all the functions which has been called from top to bottom in this view. The main purpose of this view is to show you which function has taken the most time executing. By analysing these calls, you can find bottlenecks in your code.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1080px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/020af17329c63d208ed09d98ddd7bea8/b4088/calltree.jpg\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 54.074074074074076%; position: relative; bottom: 0; left: 0; background-image: url('data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAALABQDASIAAhEBAxEB/8QAGAAAAgMAAAAAAAAAAAAAAAAAAAIBAwX/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAf/aAAwDAQACEAMQAAABynSyyAD/xAAZEAACAwEAAAAAAAAAAAAAAAAAAQIQETH/2gAIAQEAAQUCRhiI8r//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAEDAQE/AT//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAECAQE/AT//xAAUEAEAAAAAAAAAAAAAAAAAAAAg/9oACAEBAAY/Al//xAAaEAACAgMAAAAAAAAAAAAAAAAAARARITFR/9oACAEBAAE/Ic02U5BuKRR//9oADAMBAAIAAwAAABDsH//EABURAQEAAAAAAAAAAAAAAAAAAAEQ/9oACAEDAQE/EGf/xAAWEQEBAQAAAAAAAAAAAAAAAAAAIQH/2gAIAQIBAT8Qyo//xAAdEAEAAgEFAQAAAAAAAAAAAAABABGhITFBUWGR/9oACAEBAAE/EGsAt8BBi3CeR8mZNLbMp1P/2Q=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"call tree\"\n        title=\"\"\n        src=\"/static/020af17329c63d208ed09d98ddd7bea8/47311/calltree.jpg\"\n        srcset=\"/static/020af17329c63d208ed09d98ddd7bea8/6f81f/calltree.jpg 270w,\n/static/020af17329c63d208ed09d98ddd7bea8/09d21/calltree.jpg 540w,\n/static/020af17329c63d208ed09d98ddd7bea8/47311/calltree.jpg 1080w,\n/static/020af17329c63d208ed09d98ddd7bea8/0047d/calltree.jpg 1620w,\n/static/020af17329c63d208ed09d98ddd7bea8/b4088/calltree.jpg 2143w\"\n        sizes=\"(max-width: 1080px) 100vw, 1080px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>You can see in the result table that each row represents one function and the order is highest to lowest by the number of samples which has been taken while the function was executing. From docos:</p>\n<blockquote>\n<p><em>Total Time</em> is that number translated into milliseconds, based on the total amount of time covered by the selected portion of the recording. These numbers should roughly be the same as the number of samples.<br>\n<em>Total Cost</em> is that number as a percentage of the total number of samples in the selected portion of the recording.<br>\n<em>Self Time</em> is calculated as the time spent in that particular function, excluding its children. This comes from the captured stacks where this function is the leafmost function.<br>\n<em>Self Cost</em> is calculated from Self Time as a percentage of the total number of samples in the selected portion of the recording.</p>\n</blockquote>\n<h2 id=\"miscellaneous\" style=\"position:relative;\"><a href=\"#miscellaneous\" aria-label=\"miscellaneous permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Miscellaneous</h2>\n<p>There are heaps of other stuff which is outside of scope of a single post. But I want to point out a few of the other useful things you can do with Firefox Developer Tools.</p>\n<h3 id=\"accessibility-inspector\" style=\"position:relative;\"><a href=\"#accessibility-inspector\" aria-label=\"accessibility inspector permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Accessibility Inspector</h3>\n<p>The <strong>Accessibility Inspector</strong> allows you to access important information exposed to assistive technologies on the current page via the accessibility tree, which lets you to check what’s missing or needs improvements.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1080px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/853d434b15fecc13a6b2bbb64bfee1b4/06565/accessibility.jpg\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 43.7037037037037%; position: relative; bottom: 0; left: 0; background-image: url('data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAJABQDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAIGBAX/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAAHVwKObFGD/xAAZEAACAwEAAAAAAAAAAAAAAAAEEAIDETT/2gAIAQEAAQUCKjlCM5l//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwE//8QAFhABAQEAAAAAAAAAAAAAAAAAARBx/9oACAEBAAY/Amu3/8QAHRAAAQIHAAAAAAAAAAAAAAAAAAFBEBEhYYGhsf/aAAgBAQABPyFp1VGJWMGo7H//2gAMAwEAAgADAAAAELjv/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPxA//8QAFREBAQAAAAAAAAAAAAAAAAAAEBH/2gAIAQIBAT8Qp//EABwQAQABBAMAAAAAAAAAAAAAAAEAESExURBh8P/aAAgBAQABPxAltWGApfqbosRGuU83SGeP/9k='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Accessibility panel in Firefox Developer tools\"\n        title=\"\"\n        src=\"/static/853d434b15fecc13a6b2bbb64bfee1b4/47311/accessibility.jpg\"\n        srcset=\"/static/853d434b15fecc13a6b2bbb64bfee1b4/6f81f/accessibility.jpg 270w,\n/static/853d434b15fecc13a6b2bbb64bfee1b4/09d21/accessibility.jpg 540w,\n/static/853d434b15fecc13a6b2bbb64bfee1b4/47311/accessibility.jpg 1080w,\n/static/853d434b15fecc13a6b2bbb64bfee1b4/0047d/accessibility.jpg 1620w,\n/static/853d434b15fecc13a6b2bbb64bfee1b4/274e1/accessibility.jpg 2160w,\n/static/853d434b15fecc13a6b2bbb64bfee1b4/06565/accessibility.jpg 2694w\"\n        sizes=\"(max-width: 1080px) 100vw, 1080px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>On the left-hand side, there is a node tree representing all the items in the accessibility tree for the current page. Each item has two properties listed:</p>\n<ul>\n<li><em>Role</em> — the role this item has on the page (e.g., pushbutton, or footer, text leaf). This can be either a default role provided by the browser, or a role given to it via a <code class=\"language-text\">WAI-ARIA</code> role attribute.</li>\n<li><em>Name</em> — the name this item has on the page. The name depends on the element; for example, the name of most text elements is simply their textContent, whereas form elements’ names are the contents of their associated <code class=\"language-text\">&lt;label></code>.</li>\n</ul>\n<p>The cool thing here is that you can print the whole tree to <code class=\"language-text\">JSON</code>. This will help you to parse this structure looking for any specific non compliant item. As an example, <a href=\"https://medium.com/myplanet-musings/making-the-web-more-accessible-using-machine-learning-8a32eaafdb3a\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">someone made an ML model</a> to validate accessibility and this JSON is ideal for data prep for those models.</p>\n<h3 id=\"eyedropper\" style=\"position:relative;\"><a href=\"#eyedropper\" aria-label=\"eyedropper permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Eyedropper</h3>\n<p>If you want to select any particular colour in the current page, this tool is your friend. The fact that it works like a magnifying glass is really helpful to choose a colour in small areas of the page.</p>\n<p><img src=\"/c0943020253fa0f6845550187b7c8eaf/eyedropper.gif\" alt=\"Eyedropper in Firefox developer tools\"></p>\n<h2 id=\"summary\" style=\"position:relative;\"><a href=\"#summary\" aria-label=\"summary permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Summary</h2>\n<p>Firefox has come a long way and the team are working furiously adding new features and improvements with every minor and major release. Plus, we should always test our applications with multiple browsers and make sure users will have the same experience in every major browser.</p>\n<p>Have fun exploring these tricks and happy debugging.</p>\n<h2 id=\"update\" style=\"position:relative;\"><a href=\"#update\" aria-label=\"update permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Update</h2>\n<p><a href=\"https://dev.to/cecilelebleu\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Cécile Lebleu</a> mentioned in comments that I’ve forgot about CSS Grid inspector and it’s true. So let me tell you about it.</p>\n<h3 id=\"grid-inspector\" style=\"position:relative;\"><a href=\"#grid-inspector\" aria-label=\"grid inspector permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Grid inspector</h3>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Tools/Page_Inspector/How_to/Examine_grid_layouts\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Grid inspector</a> is one of the unique tools in Firefox developer tools which allows you to examine <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">CSS Grid Layouts</a>, discovering grids present on a page, examining and modifying them inline, debugging layout issues, and more.</p>\n<p>In the HTML Pane, elements laid out using a grid have a “grid” marker beside them:</p>\n<p><img src=\"/6bb4d1cccde2b27fe797566c55f88348/girdmarker.jpg\" alt=\"Grid marker beside CSS grid element in Firefox developer tools\"></p>\n<p>In addition to that, in the CSS pane’s Rules view, any instance of a <code class=\"language-text\">display: grid</code> declaration gets a grid icon included within it: <span class=\"gatsby-resp-image-wrapper\" style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 24px; \">\n      <a class=\"gatsby-resp-image-link\" href=\"/static/c248ab782f6d8404d4d776ba9118c074/8f029/gridicon.png\" style=\"display: block\" target=\"_blank\" rel=\"noopener\">\n    <span class=\"gatsby-resp-image-background-image\" style=\"padding-bottom: 100%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAABYlAAAWJQFJUiTwAAACZklEQVR42q2UTWtTURCG838EEURBxVoRwUW7Ehd+LPwF0or+AVfuXLgSxfpRxdpKoyC2tQtBrJaCttc2SW8aSUiM9iNtEtvU3OSe1/POvSc9+QIXPTAw951nJvfOTE4E+3wirYLS5tVVk1bzlZh9yKj/Kbhvb2h+bW3Hw925X/oNfKhQnEwVxYRTkBgZsnZuc8FQ/fZ7GyefLGI9hHmuv0+LmcMYGbJ2rhQ0rcmW/iK6vInbM3kce7yIe19XMRovYNzdxIVXrhh9aoyRIcsc5vKwVsQ0+11qC+dexHH2eQwHHzji971MoH80gaND38XoU2OMDFn6zDXDaxoKX/1DpoRTw0tIFirY9Xxp0LXJH2L0qTFGhqxSXYZiPn325x/0ajhXru71cCotZg5jZMjauR2HMpMNCmaK1YY2oIsNhAWpMUaGbNtQ6mH5T9kyLkeT6B9ZxiHdn/NjLi6OJ0U7rgdAo0+NMTJkr0RXdG5QmLX0lIOCiY2K7NbN6QyO6AHc+pjFndm8aH0jCTH61BgjQ5Yac4NPV+2fPK9368yzWNMe3phOi9l7SGa+0x62FvySC4dS2hvKoO7foD2UUtBDsm0FzUNxtwZndQdDzjpO6H/B25UtzOW3saC1q29SYvSpMUaGLHOYawo3Fvu1W5DG9zxdwuGHDnr0G/QOx3Bam1ls+tQYE0azzGFu22LXfB+Fioex+AYO3F/A51xZ/lLs16WoK0afGmNkyDKHuV1vGy7tI2cN5Wq9AU3om2YivG14GCNjll91u77sjTfPtmae7QKtz20XLIEqb2OL8rToWZVVyPgdrux/BFGyG+WTrA4AAAAASUVORK5CYII='); background-size: cover; display: block;\"></span>\n  <img class=\"gatsby-resp-image-image\" alt=\"Grid icon\" title=\"\" src=\"/static/c248ab782f6d8404d4d776ba9118c074/8f029/gridicon.png\" srcset=\"/static/c248ab782f6d8404d4d776ba9118c074/8f029/gridicon.png 24w\" sizes=\"(max-width: 24px) 100vw, 24px\" style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\" loading=\"lazy\" decoding=\"async\">\n  </a>\n    </span>:</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 420px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/450cd02e3f2705bbd5651062f8c974ee/65f94/gridicon.jpg\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 105.18518518518518%; position: relative; bottom: 0; left: 0; background-image: url('data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAVABQDASIAAhEBAxEB/8QAGAABAQEBAQAAAAAAAAAAAAAAAAIBAwX/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAf/aAAwDAQACEAMQAAAB8qOmEMFioEf/xAAYEAACAwAAAAAAAAAAAAAAAAAQEQABIP/aAAgBAQABBQLFhOIf/8QAFREBAQAAAAAAAAAAAAAAAAAAEAH/2gAIAQMBAT8BIf/EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8BH//EABQQAQAAAAAAAAAAAAAAAAAAADD/2gAIAQEABj8CH//EAB4QAAIBAwUAAAAAAAAAAAAAAAABERAhMUFhcZHw/9oACAEBAAE/IWuez2SROdLEKKwYE7H/2gAMAwEAAgADAAAAEAwAPP/EABgRAAIDAAAAAAAAAAAAAAAAAAEQESFR/9oACAEDAQE/EANVpX//xAAVEQEBAAAAAAAAAAAAAAAAAAAQEf/aAAgBAgEBPxCEP//EAB8QAAIBAgcAAAAAAAAAAAAAAAERACFBEDFRgZGx0f/aAAgBAQABPxAiFSggC3ibuYYKmLnBB2PeCBNPOLUS2HE0T//Z'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Grid icon next in css pane\"\n        title=\"\"\n        src=\"/static/450cd02e3f2705bbd5651062f8c974ee/65f94/gridicon.jpg\"\n        srcset=\"/static/450cd02e3f2705bbd5651062f8c974ee/6f81f/gridicon.jpg 270w,\n/static/450cd02e3f2705bbd5651062f8c974ee/65f94/gridicon.jpg 420w\"\n        sizes=\"(max-width: 420px) 100vw, 420px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>You can click on the icon and the layout will be toggled in the page for you to see the grid with lines separating each cell:</p>\n<p><img src=\"/550baee639c0fb6c3f4c624642b9f338/gridview.gif\" alt=\"Toggle grid view\"></p>\n<p>By default line numbers and area names are hidden. But you can check the two checkbox on the right to enable these.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1080px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/01931c8aedc64c5f12f304eb90804274/38084/gridlinenumber.jpg\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 48.888888888888886%; position: relative; bottom: 0; left: 0; background-image: url('data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAKABQDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAABQAE/8QAFQEBAQAAAAAAAAAAAAAAAAAAAQL/2gAMAwEAAhADEAAAAVinAJcVmqP/xAAcEAABAwUAAAAAAAAAAAAAAAAAAQIRBAUSEzL/2gAIAQEAAQUCiSrdg7a8UuHZ/8QAFREBAQAAAAAAAAAAAAAAAAAAARD/2gAIAQMBAT8BZ//EABURAQEAAAAAAAAAAAAAAAAAAAEQ/9oACAECAQE/ASf/xAAcEAABAwUAAAAAAAAAAAAAAAAAAhAhEjJBUXH/2gAIAQEABj8CwJpiNFzI43//xAAcEAEAAgIDAQAAAAAAAAAAAAABABExUSGhsfD/2gAIAQEAAT8hRmOthGPQvKhufQICsTufY5n/2gAMAwEAAgADAAAAEEwv/8QAFhEBAQEAAAAAAAAAAAAAAAAAARAR/9oACAEDAQE/EEZP/8QAFhEBAQEAAAAAAAAAAAAAAAAAERAx/9oACAECAQE/EG7P/8QAHBABAAICAwEAAAAAAAAAAAAAAQARITFxgZHw/9oACAEBAAE/EDBE1FeWRYG6CW9Ig5+XEEKHkwqg2T//2Q=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Line numbers and area names in grid view\"\n        title=\"\"\n        src=\"/static/01931c8aedc64c5f12f304eb90804274/47311/gridlinenumber.jpg\"\n        srcset=\"/static/01931c8aedc64c5f12f304eb90804274/6f81f/gridlinenumber.jpg 270w,\n/static/01931c8aedc64c5f12f304eb90804274/09d21/gridlinenumber.jpg 540w,\n/static/01931c8aedc64c5f12f304eb90804274/47311/gridlinenumber.jpg 1080w,\n/static/01931c8aedc64c5f12f304eb90804274/0047d/gridlinenumber.jpg 1620w,\n/static/01931c8aedc64c5f12f304eb90804274/274e1/gridlinenumber.jpg 2160w,\n/static/01931c8aedc64c5f12f304eb90804274/38084/gridlinenumber.jpg 2641w\"\n        sizes=\"(max-width: 1080px) 100vw, 1080px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>","timeToRead":6,"frontmatter":{"unformattedDate":"2019-08-08T00:00:00.000Z","date":"August 08, 2019","title":"Firefox Developer Tools can do that?","subtitle":null,"id":null,"author":"Yaser Adel Mehraban","gravatar":null,"canonical_url":null,"tags":["webdev","firefox","devtools","showdev"],"thumbnail":{"childImageSharp":{"gatsbyImageData":{"layout":"constrained","placeholder":{"fallback":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAHCAYAAAAIy204AAAACXBIWXMAAAsTAAALEwEAmpwYAAACGklEQVR42jWK30tTYRzGz9Wh5aZuR2XDNKW5Hzj3W5e6GstVOi2lrIsIrUG5FD3bOnNuOzq6MaIgEF7BcFuSSkSYdRF01U1GUZddRNR/0Iu3wd729Jb0hQ8Pz/P9CKoct87NxVbfvntPfv0GAUB2dl+SmZk4keVZks9mSCYzTzLZLFHmM0RRFJJKJEgqlfqHklK4J5ME3zirQqGwHC2VN1EqbWPnxWsUi9t4vPEUhJSwsrKOtfUnKJa3kFMXoRbuYHFpCWpeRT6XR57nQjaHZHqhmkymqun0PASHuyM6ePEufBO7lRPRR6xz+jMLTxVZrrDHZh5+YbHSVxa6NM3Mli5mtjpY81ELMx4xsyZjK6upqWW1ujqm0dRU6vWGik5XByHgtkdPXb0HT+YNwte24F7+hkh6A+qDT5gtf8fN5z9wdkJGd/AcRoZjiAzG4D05CktXL6RGE0wco6m56nD5q21tbRDC4UD0wuR9dN96hjOX19CT+4je6ysYvfIKQWUPzuUPOD4+hW5/P/r9YfT5Q/B4AzAf64C+Xo9DGg28Xl9VlpNVl8sNIRgMRU6fv7HvGY7T3kiMusduU//QJO0bmKbeEZk6xxO0Z2CMOp0+and4qL1niFo7fbS9vYMaDA1UrzfQxsamny0trVSSGvYFfodFQbBKomgTOVpBsGl5Cn+TI3FEUXvwkySb1hKyiVqJ9/+7lrsHPnesfwDJmfEFmaj8igAAAABJRU5ErkJggg=="},"backgroundColor":"transparent","images":{"fallback":{"src":"/static/ea9929276e8dd946cdec82b81551a1af/fa238/firefoxdevtools.png","srcSet":"/static/ea9929276e8dd946cdec82b81551a1af/067ac/firefoxdevtools.png 750w,\n/static/ea9929276e8dd946cdec82b81551a1af/47495/firefoxdevtools.png 1080w,\n/static/ea9929276e8dd946cdec82b81551a1af/43d27/firefoxdevtools.png 1366w,\n/static/ea9929276e8dd946cdec82b81551a1af/2d118/firefoxdevtools.png 1920w,\n/static/ea9929276e8dd946cdec82b81551a1af/fa238/firefoxdevtools.png 2400w","sizes":"(min-width: 2400px) 2400px, 100vw"},"sources":[{"srcSet":"/static/ea9929276e8dd946cdec82b81551a1af/ad590/firefoxdevtools.webp 750w,\n/static/ea9929276e8dd946cdec82b81551a1af/4ae4c/firefoxdevtools.webp 1080w,\n/static/ea9929276e8dd946cdec82b81551a1af/8367a/firefoxdevtools.webp 1366w,\n/static/ea9929276e8dd946cdec82b81551a1af/733b4/firefoxdevtools.webp 1920w,\n/static/ea9929276e8dd946cdec82b81551a1af/43628/firefoxdevtools.webp 2400w","type":"image/webp","sizes":"(min-width: 2400px) 2400px, 100vw"}]},"width":2400,"height":800}}},"cover":{"childImageSharp":{"gatsbyImageData":{"layout":"constrained","placeholder":{"fallback":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAIAAAA7N+mxAAAACXBIWXMAAAsTAAALEwEAmpwYAAAB5klEQVR42h3LWU/bQBSGYf/7Su0tUm76A3qLqhYJAW0FZJx4hoQEsB2v48w43mbxFi+Jo9pIj16dc/EpG8z1qNKjcpccfd7sxagNRBOI1mcNZi3Nu0PehnISFz2VrZ/VlDd+kiuI5hY/7Vi3DtgaMzPMTcp3kTRDYUWFTqVBpZuUOK1wUniRdOIiLM7Z8UL4UZkTuU7bj7S5Xxk389c/yLhbbP6i99+P8OnVBlv7Ybl93lhPE/tOXYGNTfJTVA04qxVAJEwaFDcmP/lywPmZlAOtL/vyMh3VhdQXUl2CcvCLYV8N4+vKfsdPejSOqUTxEWIJXbEKivewttLG4x2WPS3OpBhc0U945/DOZt14W7w3WP92KBXgpMgVmsWhJxEukF+sgnJLSittHdaPrKw3WW+K3vzcjDVFN3Z7qBRgxCtPrB0GXalaGdglz0aseYWGSzipYFBBWsOkRax/yfq516m4/RjHYamojlg+g/XtNbSyW826WZg/wccS52jc7CtIPjsp0eEIw+7b1/OXqx6xTqOFAv381z2YXc0Wdqo6qeqyhc8XWL7sa0Sqyb5CtEZh/dlm9uP0/bpbZy3whPL0RuZm+k9PVDsDI4cBX6hWrBoH1YxUfWwMXAY8PrFTLcg0wlSHP+rRfzk1D9IpaNVlAAAAAElFTkSuQmCC"},"backgroundColor":"transparent","images":{"fallback":{"src":"/static/99301920bb64a6329a701cef81b408ea/a2195/socialpreview.png","srcSet":"/static/99301920bb64a6329a701cef81b408ea/cadb4/socialpreview.png 750w,\n/static/99301920bb64a6329a701cef81b408ea/a2195/socialpreview.png 800w","sizes":"(min-width: 800px) 800px, 100vw"},"sources":[{"srcSet":"/static/99301920bb64a6329a701cef81b408ea/11ba1/socialpreview.webp 750w,\n/static/99301920bb64a6329a701cef81b408ea/5f042/socialpreview.webp 800w","type":"image/webp","sizes":"(min-width: 800px) 800px, 100vw"}]},"width":800,"height":400}}},"img":{"publicURL":"/static/ea9929276e8dd946cdec82b81551a1af/firefoxdevtools.png"},"socialPreview":{"publicURL":"/static/99301920bb64a6329a701cef81b408ea/socialpreview.png"}}}},"pageContext":{"title":"Firefox Developer Tools can do that?","postPath":"/blog/2019/08/08/firefox-dev-tools","nextPost":"/blog/2019/08/17/js-async-await","previousPost":"/blog/2019/08/06/es2019"}},"staticQueryHashes":[],"slicesMap":{}}