tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

index.rst (10244B)


      1 .. toctree::
      2   :name: devtools-user-doc
      3 
      4 ==========================
      5 Firefox DevTools User Docs
      6 ==========================
      7 
      8 Firefox Developer Tools is a set of web developer tools built into Firefox. You can use them to examine, edit, and debug HTML, CSS, and JavaScript.
      9 
     10 This section contains detailed guides to all of the tools as well as information on how to debug Firefox for Android, how to extend DevTools, and how to debug the browser as a whole.
     11 
     12 If you have any feedback on DevTools or want to contribute to the project, you can `join the DevTools community <https://firefox-dev.tools/>`_.
     13 
     14 .. note::
     15 
     16  If you are just getting started with web development and using developer tools, our `learning <https://developer.mozilla.org/en-US/docs/Learn>`_ docs will help you — see `Getting started with the Web <https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web>`_ and `What are browser developer tools? <https://developer.mozilla.org/en-US/docs/Learn/Common_questions/What_are_browser_developer_tools>`_ for good starting points.
     17 
     18 
     19 The Core Tools
     20 **************
     21 
     22 You can open the Firefox Developer Tools from the menu by selecting **Tools > Web Developer > Web Developer Tools** or use the keyboard shortcut :kbd:`Ctrl` + :kbd:`Shift` + :kbd:`I` or :kbd:`F12` on Windows and Linux, or :kbd:`Cmd` + :kbd:`Opt` + :kbd:`I` on macOS.
     23 
     24 The ellipsis menu on the right-hand side of Developer Tools contains several commands that let you perform actions or change tool settings.
     25 
     26 .. figure:: devtools_layoutmenu.png
     27   :align: center
     28 
     29 
     30 ========== ================================================================
     31 |image1|   This button only appears when there are multiple iframes on a
     32            page. Click it to display a list of the iframes on the current
     33            page and select the one with which you want to work.
     34 
     35 |image2|   Click this button to take a screenshot of the current page.
     36            (*Note:* This feature is not turned on by
     37            default and must be enabled in settings before the icon will
     38            appear.)
     39 
     40 |image3|   Toggles Responsive Design Mode
     41 
     42 |image4|   Opens the menu that includes docking options, the ability to show
     43            or hide the split console, and Developer Tools settings.
     44            The menu also includes links to the documentation for Firefox
     45            Web Tools and the Mozilla Community.
     46 
     47 |image5|   Closes the Developer Tools
     48 
     49 ========== ================================================================
     50 
     51 .. |image1| image:: iframe_button.png
     52    :class: center
     53 .. |image2| image:: camera_button.png
     54    :class: center
     55 .. |image3| image:: responsive_button.png
     56    :class: center
     57 .. |image4| image:: menu_button.png
     58    :class: center
     59 .. |image5| image:: close_button.png
     60    :class: center
     61 
     62 
     63 `Page Inspector <page_inspector>`__
     64 -----------------------------------
     65 
     66 .. image:: landingpage_pageinspector.png
     67    :class: border
     68    :target: page_inspector
     69    :alt: The all-new Inspector panel in Firefox 57.
     70 
     71 View and edit page content and layout. Visualize many aspects of the page including the box model, animations, and grid layouts
     72 
     73 
     74 `Web Console <web_console>`__
     75 -----------------------------
     76 
     77 .. image:: landingpage_console.png
     78    :class: border
     79    :target: web_console
     80    :alt: The all-new Console panel in Firefox 57.
     81 
     82 See messages logged by a web page and interact with the page using JavaScript.
     83 
     84 
     85 `JavaScript Debugger <debugger>`__
     86 ----------------------------------
     87 
     88 .. image:: landingpage_debugger.png
     89    :class: border
     90    :target: debugger
     91    :alt: The all-new Debugger panel in Firefox 57.
     92 
     93 Stop, step through, and examine the JavaScript running on a page.
     94 
     95 
     96 `Network Monitor <network_monitor>`__
     97 -------------------------------------
     98 
     99 .. image:: landingpage_network.png
    100    :class: border
    101    :target: network_monitor
    102    :alt: The Network panel in Firefox 57 DevTools.
    103 
    104 
    105 See the network requests made when a page is loaded.
    106 
    107 
    108 `Performance Panel <https://profiler.firefox.com/docs/>`__
    109 ----------------------------------------------------------
    110 
    111 .. image:: landingpage_performance_2022.png
    112    :class: border
    113    :target: https://profiler.firefox.com/docs/
    114    :alt: Performance Panel in Firefox 103 Developer Tools.
    115 
    116 Analyze your site's general responsiveness, JavaScript, and layout performance.
    117 
    118 
    119 `Responsive Design Mode <responsive_design_mode>`__
    120 ---------------------------------------------------
    121 
    122 .. image:: landingpage_responsivedesign.png
    123    :class: border
    124    :target: responsive_design_mode
    125    :alt: Responsive Design mode in Firefox 57 Developer Tools.
    126 
    127 See how your website or app will look and behave on different devices and network types.
    128 
    129 
    130 `Accessibility inspector <accessibility_inspector>`__
    131 -----------------------------------------------------
    132 
    133 .. image:: landingpage_accessibility.png
    134    :class: border
    135    :target: accessibility_inspector
    136    :alt: Performance Tools in Firefox 57 Developer Tools.
    137 
    138 Provides a means to access the page's accessibility tree, allowing you to check what's missing or otherwise needs attention.
    139 
    140 
    141 `Application panel <application>`__
    142 -----------------------------------
    143 
    144 .. image:: just-application-panel.png
    145    :class: border
    146    :target: application
    147    :alt: Performance Tools in Firefox 57 Developer Tools.
    148 
    149 Provides tools for inspecting and debugging modern web apps (also known as `Progressive Web Apps <https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps>`_). This includes inspection of `service workers <https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API>`_ and `web app manifests <https://developer.mozilla.org/en-US/docs/Web/Manifest>`_
    150 
    151 
    152 .. note::
    153 
    154  The collective term for the UI inside which the DevTools all live is the :doc:`Toolbox <tools_toolbox/index>`
    155 
    156 
    157 More Tools
    158 **********
    159 
    160 These developer tools are also built into Firefox. Unlike the "Core Tools" above, you might not use them every day.
    161 
    162 .. list-table::
    163  :widths: 25 75
    164  :header-rows: 0
    165 
    166  * - :doc:`Memory <memory/index>`
    167    - Figure out which objects are keeping memory in use.
    168 
    169  * - :doc:`Storage Inspector <storage_inspector/index>`
    170    - Inspect cookies, local storage, indexedDB, and session storage present in a page.
    171 
    172  * - :doc:`DOM Property Viewer <dom_property_viewer/index>`
    173    - Inspect the page's DOM properties, functions, etc.
    174 
    175  * - :doc:`Eyedropper <eyedropper/index>`
    176    - Select a color from the page.
    177 
    178  * - :doc:`Style Editor <style_editor/index>`
    179    - View and edit CSS styles for the current page.
    180 
    181  * - :doc:`Taking screenshot <taking_screenshots/index>`
    182    - Take a screenshot of the entire page or of a single element.
    183 
    184  * - :doc:`Measure a portion of the page <measure_a_portion_of_the_page/index>`
    185    - Measure a specific area of a web page.
    186 
    187  * - :doc:`Rulers <rulers/index>`
    188    - Overlay horizontal and vertical rulers on a web page
    189 
    190  * - :doc:`Custom formatters <custom_formatters/index>`
    191    - Customize the way objects are displayed within the DevTools.
    192 
    193  * - :doc:`JavaScript tracer <javascript_tracer/index>`
    194    - Live display all JavaScript function calls.
    195 
    196 .. image:: logo-developer-quantum.png
    197    :class: center
    198 
    199 .. rst-class:: center
    200 
    201  For the latest developer tools and features, try Firefox Developer Edition.
    202 
    203  `Download Firefox Developer Edition <https://www.mozilla.org/en-US/firefox/developer/>`_
    204 
    205 
    206 
    207 Connecting the Developer Tools
    208 ******************************
    209 
    210 If you open the developer tools using :ref:`keyboard shortcuts <keyboard-shortcuts-opening-and-closing-tools>` or the equivalent menu items, they'll target the document hosted by the currently active tab. But you can attach the tools to a variety of other targets, too, both within the current browser and in different browsers or even different devices.
    211 
    212 .. list-table::
    213   :widths: 30 70
    214   :header-rows: 0
    215 
    216   * - :doc:`about:debugging <about_colon_debugging/index>`
    217     - Debug add-ons, content tabs, and workers running in the browser.
    218 
    219   * - :ref:`Connecting to Firefox for Android <about-colon-debugging-connecting-to-a-remote-device>`
    220     - Connect the developer tools to an instance of Firefox running on an Android device.
    221 
    222   * - :doc:`Connecting to iframes <working_with_iframes/index>`
    223     - Connect the developer tools to a specific iframe in the current page.
    224 
    225 
    226 Debugging the browser
    227 *********************
    228 
    229 By default, the developer tools are attached to a web page or web app. But you can also connect them to the browser as a whole. This is useful for browser and add-on development.
    230 
    231 .. list-table::
    232   :widths: 30 70
    233   :header-rows: 0
    234 
    235   * - :doc:`Browser Console <browser_console/index>`
    236     - See messages logged by the browser itself and by add-ons, and run JavaScript code in the browser's scope.
    237 
    238   * - :doc:`Browser Toolbox <browser_toolbox/index>`
    239     - Attach the Developer Tools to the browser itself.
    240 
    241 
    242 
    243 Extending DevTools
    244 ******************
    245 
    246 For information on extending the Firefox DevTools, see `Extending the developer tools <https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Extending_the_developer_tools>`_ over in the `Browser Extensions <https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions>`_ section of MDN.
    247 
    248 
    249 Migrating from Firebug
    250 **********************
    251 
    252 Firebug has come to the end of its lifespan (see `Firebug lives on in Firefox DevTools <https://hacks.mozilla.org/2016/12/firebug-lives-on-in-firefox-devtools/>`_ for details of why), and we appreciate that some people will find migrating to another less familiar set of DevTools to be challenging. To ease a transition from Firebug to the Firefox developer tools, we have written a handy guide — :doc:`Migrating from Firebug <./migrating_from_firebug/index>`
    253 
    254 
    255 Contribute
    256 **********
    257 
    258 If you want to help improve the developer tools, these resources will get you started.
    259 
    260 
    261 .. list-table::
    262   :widths: 30 70
    263   :header-rows: 0
    264 
    265   * - `Get Involved <https://firefox-dev.tools/>`_
    266     - Our community website explains how to get involved.
    267 
    268   * - `codetribute.mozilla.org <https://codetribute.mozilla.org/projects/devtools/>`_
    269     - A tool helping to find bugs to work on.
    270 
    271   * - :ref:`Read source docs <devtools-contributor-doc>`
    272     - Firefox DevTools source code documentation.