If DevTools are essentially just a web app, you should be able to run DevTools on DevTools, right? Indeed, you can! In fact, you don't need to install any special tooling to try it. Everything you need is already in your browser.
- Open your Chromium-based browser (Edge, Chrome, etc.) and press F12 to open DevTools.
- Pop out the DevTools in their own window by going to the ... menu at the top right and choosing "Undock into separate window," which is the first icon in the Dock side options.
- With the DevTools window active, press Ctrl-Shift-I (PC) or Cmd-Shift-I (Mac) to open a second instance of DevTools on DevTools.
Now, you can use the Inspect tool in the newly-opened DevTools instance to hover over elements in the previously-opened DevTools instance. You can tweak
div sizes, colors, fonts, and more in the Styles pane, and changes will be reflected right away.
Any changes you make to DevTools won't persist and will reset on reload, so let your imagination run free!
Aside from having a new party trick to show off, why would you want to run DevTools on DevTools?
One useful scenario is for authoring and debugging DevTools extensions. Developer extensions for React and Vue, for example, are DevTools extensions. If you're authoring your own DevTools extension, you might find DevTools-on-DevTools useful.
Another use case would be for those who want to fix bugs or add new features to the Chromium DevTools codebase. In fact, the folks who build DevTools use DevTools-on-DevTools quite a bit to debug, mock up, and build new features. How do I know? Well, I'm one of those folks! 👋
I have been working with some colleagues on a new interface in Edge DevTools called Focus Mode, which allows you to group different tabs together so your DevTools don't get too cluttered and overwhelming. Running DevTools against DevTools, I was able to use our flexbox debugging features to add outlines to the flex items contained in the new Activity Bar along the left side. I could also play with the size and positioning of icons to make high-fidelity mockups to share with my team.
So, there you have it! Simple instructions for debugging DevTools with DevTools. 🎀