Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Uncategorized
  3. Here's a thread of cool things I found exploring the #Firefox Developer Tools!

Here's a thread of cool things I found exploring the #Firefox Developer Tools!

Scheduled Pinned Locked Moved Uncategorized
firefoxniriwebdevdevtools
25 Posts 7 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • blinryB This user is from outside of this forum
    blinryB This user is from outside of this forum
    blinry
    wrote last edited by
    #1

    Here's a thread of cool things I found exploring the #Firefox Developer Tools!

    First, a really convenient thing: You can "pop out" the Toolbox into a separate window!

    To do this, open the Toolbox (using F12), click on the ellipsis menu on the right, and select "Separate Window".

    I like this much better than the default "docked" modes, especially when using a scrolling window manager like #niri!

    #webdev #devtools

    rag. Gustavino BevilacquaG blinryB 2 Replies Last reply
    1
    0
    • blinryB blinry

      Here's a thread of cool things I found exploring the #Firefox Developer Tools!

      First, a really convenient thing: You can "pop out" the Toolbox into a separate window!

      To do this, open the Toolbox (using F12), click on the ellipsis menu on the right, and select "Separate Window".

      I like this much better than the default "docked" modes, especially when using a scrolling window manager like #niri!

      #webdev #devtools

      rag. Gustavino BevilacquaG This user is from outside of this forum
      rag. Gustavino BevilacquaG This user is from outside of this forum
      rag. Gustavino Bevilacqua
      wrote last edited by
      #2

      @blinry

      Also, really good if you have two monitors!

      1 Reply Last reply
      0
      • blinryB blinry

        Here's a thread of cool things I found exploring the #Firefox Developer Tools!

        First, a really convenient thing: You can "pop out" the Toolbox into a separate window!

        To do this, open the Toolbox (using F12), click on the ellipsis menu on the right, and select "Separate Window".

        I like this much better than the default "docked" modes, especially when using a scrolling window manager like #niri!

        #webdev #devtools

        blinryB This user is from outside of this forum
        blinryB This user is from outside of this forum
        blinry
        wrote last edited by
        #3

        Let's start with the "Inspector", which shows you the tree of HTML elements.

        You can directly summon it, and inspect a specific element on your current site by pressing Ctrl+Shift+C (Cmd+Opt+C on macOS), and then clicking your element.

        This is similar to right-clicking the element, and pressing Q, but I like Ctrl+Shift+C a bit better because it will give you a live preview of which node you are picking!

        blinryB 1 Reply Last reply
        0
        • blinryB blinry

          Let's start with the "Inspector", which shows you the tree of HTML elements.

          You can directly summon it, and inspect a specific element on your current site by pressing Ctrl+Shift+C (Cmd+Opt+C on macOS), and then clicking your element.

          This is similar to right-clicking the element, and pressing Q, but I like Ctrl+Shift+C a bit better because it will give you a live preview of which node you are picking!

          blinryB This user is from outside of this forum
          blinryB This user is from outside of this forum
          blinry
          wrote last edited by
          #4

          All tree views in the DevTools have pretty good support for keyboard shortcuts!

          You can use arrow up & down to highlight different elements, and arrow right & left to unfold/fold the elements.

          You can find a full list of keyboard shortcuts here: https://firefox-source-docs.mozilla.org/devtools-user/keyboard_shortcuts/index.html

          blinryB 1 Reply Last reply
          0
          • blinryB blinry

            All tree views in the DevTools have pretty good support for keyboard shortcuts!

            You can use arrow up & down to highlight different elements, and arrow right & left to unfold/fold the elements.

            You can find a full list of keyboard shortcuts here: https://firefox-source-docs.mozilla.org/devtools-user/keyboard_shortcuts/index.html

            blinryB This user is from outside of this forum
            blinryB This user is from outside of this forum
            blinry
            wrote last edited by
            #5

            All elements with "display: flex" have a little "flex" pill icon next to them. If you click it, it will highlight the structure of the flexbox, and keep it highlighted as you interact with it!

            blinryB 1 Reply Last reply
            0
            • blinryB blinry

              All elements with "display: flex" have a little "flex" pill icon next to them. If you click it, it will highlight the structure of the flexbox, and keep it highlighted as you interact with it!

              blinryB This user is from outside of this forum
              blinryB This user is from outside of this forum
              blinry
              wrote last edited by
              #6

              This is probably common knowledge, but I wasn't aware of it so far:

              The sun & moon icons in the "Rules" tab allow you to quickly force the site into light mode/dark mode! ☀️🌙

              blinryB 1 Reply Last reply
              0
              • blinryB blinry

                This is probably common knowledge, but I wasn't aware of it so far:

                The sun & moon icons in the "Rules" tab allow you to quickly force the site into light mode/dark mode! ☀️🌙

                blinryB This user is from outside of this forum
                blinryB This user is from outside of this forum
                blinry
                wrote last edited by
                #7

                You can open the web console in a split view by pressing Esc!

                This is the same console as in the "Console" tab. And this works in any tab, not just the Inspector! Super useful if you wanna see more things at once!

                blinryB 1 Reply Last reply
                0
                • blinryB blinry

                  You can open the web console in a split view by pressing Esc!

                  This is the same console as in the "Console" tab. And this works in any tab, not just the Inspector! Super useful if you wanna see more things at once!

                  blinryB This user is from outside of this forum
                  blinryB This user is from outside of this forum
                  blinry
                  wrote last edited by
                  #8

                  In the CSS pane, there's this little dashed box icon after CSS rules. Click it to permanently highlight the matching elements on the page!

                  Here, I highlight a specific <p> element. The colors that are used correspond to the colors in the "Layout" tab, and show you the size of the margin, border, padding, and content area.

                  blinryB 1 Reply Last reply
                  0
                  • blinryB blinry

                    In the CSS pane, there's this little dashed box icon after CSS rules. Click it to permanently highlight the matching elements on the page!

                    Here, I highlight a specific <p> element. The colors that are used correspond to the colors in the "Layout" tab, and show you the size of the margin, border, padding, and content area.

                    blinryB This user is from outside of this forum
                    blinryB This user is from outside of this forum
                    blinry
                    wrote last edited by
                    #9

                    If you click on the dashed box after a more general rule, you'll get all matching elements highlighted.

                    Here, I highlight all <p> elements of that toot.

                    blinryB 1 Reply Last reply
                    0
                    • blinryB blinry

                      If you click on the dashed box after a more general rule, you'll get all matching elements highlighted.

                      Here, I highlight all <p> elements of that toot.

                      blinryB This user is from outside of this forum
                      blinryB This user is from outside of this forum
                      blinry
                      wrote last edited by
                      #10

                      In the Inspector, Ctrl+F jumps to the search box that allows you to find a tag or some content.

                      I was always annoyed that F3 doesn't go to the next result. Turns out that the shortcut for that is:

                      Enter!

                      GreenSkyOverMe (Monika)G blinryB 2 Replies Last reply
                      0
                      • blinryB blinry

                        In the Inspector, Ctrl+F jumps to the search box that allows you to find a tag or some content.

                        I was always annoyed that F3 doesn't go to the next result. Turns out that the shortcut for that is:

                        Enter!

                        GreenSkyOverMe (Monika)G This user is from outside of this forum
                        GreenSkyOverMe (Monika)G This user is from outside of this forum
                        GreenSkyOverMe (Monika)
                        wrote last edited by
                        #11

                        @blinry Not very intuitive

                        1 Reply Last reply
                        0
                        • blinryB blinry

                          In the Inspector, Ctrl+F jumps to the search box that allows you to find a tag or some content.

                          I was always annoyed that F3 doesn't go to the next result. Turns out that the shortcut for that is:

                          Enter!

                          blinryB This user is from outside of this forum
                          blinryB This user is from outside of this forum
                          blinry
                          wrote last edited by
                          #12

                          As you start modifying the CSS rules, and arrive at something you like, you can switch over to the "Changes" tab to find a summary of what you changed!

                          You can also copy all of that into your clipboard, and then integrate it into the original CSS that you're working on!

                          Until now, I always made changes in my source CSS files directly, and used some auto-refresh tool to preview it. But this workflow of modifying it directly, and copying out the required changes might be a bit smoother!

                          blinryB 1 Reply Last reply
                          0
                          • blinryB blinry

                            As you start modifying the CSS rules, and arrive at something you like, you can switch over to the "Changes" tab to find a summary of what you changed!

                            You can also copy all of that into your clipboard, and then integrate it into the original CSS that you're working on!

                            Until now, I always made changes in my source CSS files directly, and used some auto-refresh tool to preview it. But this workflow of modifying it directly, and copying out the required changes might be a bit smoother!

                            blinryB This user is from outside of this forum
                            blinryB This user is from outside of this forum
                            blinry
                            wrote last edited by
                            #13

                            Next, I looked at the Console.

                            I learned that it has some predefined helper functions! You can use `$(selector)` as an abbreviation for `document.querySelector(selector)`.

                            Similarly, `$$(selector)` is short for `document.querySelectorAll(selector)`!

                            Even though this reeks of jQuery, I think these are fantastic in this context and I might use them *a lot*!

                            blinryB Adam KatzA 2 Replies Last reply
                            0
                            • blinryB blinry

                              Next, I looked at the Console.

                              I learned that it has some predefined helper functions! You can use `$(selector)` as an abbreviation for `document.querySelector(selector)`.

                              Similarly, `$$(selector)` is short for `document.querySelectorAll(selector)`!

                              Even though this reeks of jQuery, I think these are fantastic in this context and I might use them *a lot*!

                              blinryB This user is from outside of this forum
                              blinryB This user is from outside of this forum
                              blinry
                              wrote last edited by
                              #14

                              There are more "Console Helpers" in #firefox:

                              $_ is a shortcut to the result of the last expression you executed, allowing you to do some neat step-by-step exploration.

                              And $0 refers to the currently-inspected element on the page.

                              blinryB ? jetcoolJ 3 Replies Last reply
                              0
                              • blinryB blinry

                                There are more "Console Helpers" in #firefox:

                                $_ is a shortcut to the result of the last expression you executed, allowing you to do some neat step-by-step exploration.

                                And $0 refers to the currently-inspected element on the page.

                                blinryB This user is from outside of this forum
                                blinryB This user is from outside of this forum
                                blinry
                                wrote last edited by
                                #15

                                There's a couple more, like copy(), which copies its argument to your clipboard, or keys(), an abbreviation for Object.keys().

                                If you ever forget these console helpers, you can run :help to open the page of the documentation that explains them!

                                https://firefox-source-docs.mozilla.org/devtools-user/web_console/helpers/

                                blinryB 1 Reply Last reply
                                0
                                • blinryB blinry

                                  There's a couple more, like copy(), which copies its argument to your clipboard, or keys(), an abbreviation for Object.keys().

                                  If you ever forget these console helpers, you can run :help to open the page of the documentation that explains them!

                                  https://firefox-source-docs.mozilla.org/devtools-user/web_console/helpers/

                                  blinryB This user is from outside of this forum
                                  blinryB This user is from outside of this forum
                                  blinry
                                  wrote last edited by
                                  #16

                                  There's a built-in multi-line editing mode! Press Ctrl+B to turn it on. Seems useful to write longer expressions.

                                  This mode shares its history with the regular one-line mode.

                                  blinryB 1 Reply Last reply
                                  0
                                  • blinryB blinry

                                    There's a built-in multi-line editing mode! Press Ctrl+B to turn it on. Seems useful to write longer expressions.

                                    This mode shares its history with the regular one-line mode.

                                    blinryB This user is from outside of this forum
                                    blinryB This user is from outside of this forum
                                    blinry
                                    wrote last edited by
                                    #17

                                    But also, I learned that the one-line mode tries to guess whether your command is incomplete when you press Enter, and then allows you to type a second line.

                                    You can force a new line using Shift+Enter.

                                    blinryB 1 Reply Last reply
                                    0
                                    • blinryB blinry

                                      But also, I learned that the one-line mode tries to guess whether your command is incomplete when you press Enter, and then allows you to type a second line.

                                      You can force a new line using Shift+Enter.

                                      blinryB This user is from outside of this forum
                                      blinryB This user is from outside of this forum
                                      blinry
                                      wrote last edited by
                                      #18

                                      That's all cool things I found in the Firefox DevTools today! Looking forward to check out the other tabs some other time.

                                      It's kind of eye-opening for me how many convenient things a tool like that has. So far, when I opened the Toolbox, I usually quickly wanted to get something specific done, and didn't take the time to wander & explore…

                                      What are your favorite built-in dev tools in Firefox? What did I miss in "Inspector" and "Console" today?

                                      blinryB 1 Reply Last reply
                                      0
                                      • blinryB blinry

                                        Next, I looked at the Console.

                                        I learned that it has some predefined helper functions! You can use `$(selector)` as an abbreviation for `document.querySelector(selector)`.

                                        Similarly, `$$(selector)` is short for `document.querySelectorAll(selector)`!

                                        Even though this reeks of jQuery, I think these are fantastic in this context and I might use them *a lot*!

                                        Adam KatzA This user is from outside of this forum
                                        Adam KatzA This user is from outside of this forum
                                        Adam Katz
                                        wrote last edited by
                                        #19

                                        @blinry what is the difference between $$(…) and $$$(…)? I didn't know about $$(…)

                                        Nicolas ChevobbeN 1 Reply Last reply
                                        0
                                        • blinryB blinry

                                          That's all cool things I found in the Firefox DevTools today! Looking forward to check out the other tabs some other time.

                                          It's kind of eye-opening for me how many convenient things a tool like that has. So far, when I opened the Toolbox, I usually quickly wanted to get something specific done, and didn't take the time to wander & explore…

                                          What are your favorite built-in dev tools in Firefox? What did I miss in "Inspector" and "Console" today?

                                          blinryB This user is from outside of this forum
                                          blinryB This user is from outside of this forum
                                          blinry
                                          wrote last edited by
                                          #20

                                          Ohh, the CSS pane helps you debug values of the "transform" property by showing you the box before and after the transformation!

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          Powered by NodeBB Contributors
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups