tor-browser

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

index.rst (3676B)


      1 ===============
      2 Browser Toolbox
      3 ===============
      4 
      5 The Browser Toolbox enables you to debug add-ons and the browser's own JavaScript code rather than just web pages like the normal :doc:`Toolbox <../tools_toolbox/index>`. The Browser Toolbox's context is the whole browser rather than justsingle page on a single tab.
      6 
      7 Enabling the Browser Toolbox
      8 ****************************
      9 
     10 The Browser Toolbox is not enabled by default. To enable it you need to check the settings "Enable chrome and addon debugging" and "Enable remote debugging".
     11 
     12 To do this, open the Developer Tools :doc:`Settings <../settings/index>`, go to the section :ref:`Advanced Settings <settings_advanced_settings>`, and check the settings "Enable browser chrome and add-on debugging toolboxes" and "Enable remote debugging".
     13 
     14 .. image:: settings_for_browser_debugger.png
     15  :alt: Developer Tools Settings
     16  :class: border
     17 
     18 
     19 Opening the Browser Toolbox
     20 ***************************
     21 
     22 .. |image1| image:: 2014-01-10-13-08-08-f52b8c.png
     23  :alt: new fx menu
     24 
     25 Open the Browser Toolbox through the menu button |image1| and the menu items "Developer" then "Browser Toolbox".
     26 
     27 You can also open it with the :kbd:`Ctrl` + :kbd:`Alt` + :kbd:`Shift` + :kbd:`I` key combination (:kbd:`Cmd` + :kbd:`Opt` + :kbd:`Shift` + :kbd:`I` on a Mac).
     28 
     29 You will be presented with a dialog like this (it can be removed by setting the ``devtools.debugger.prompt-connection`` property to false):
     30 
     31 .. image:: browser-toolbox-warning.png
     32 
     33 Click OK, and the Browser Toolbox will open in its own window:
     34 
     35 .. image:: browser-toolbox.png
     36 
     37 You'll be able to inspect the browser's chrome windows and see, and be able to debug, all the JavaScript files loaded by the browser itself and by any add-ons that are running. Altogether you will have access to the following developer tools:
     38 
     39 
     40 - :doc:`Debugger <../debugger/index>`
     41 - :doc:`Console <../browser_console/index>`
     42 - :doc:`Style Editor <../style_editor/index>`
     43 - :doc:`Performance <../performance/index>`
     44 - :doc:`Network Monitor <../network_monitor/index>`
     45 - :doc:`Page Inspector <../page_inspector/index>`
     46 - :doc:`Accessibility Inspector <../accessibility_inspector/index>`
     47 
     48 You can debug chrome: and about: pages using the normal :doc:`Debugger <../debugger/index>`, just as if they were ordinary content pages.
     49 
     50 
     51 Targeting a document
     52 ********************
     53 
     54 In the normal toolbox, there's a :doc:`button in the toolbar enabling you to target specific iframes in the document <../working_with_iframes/index>`. The same button appears in the browser toolbox where it lists all the top-level chrome and content windows as well as any iframes they contain. This enables you to inspect documents in individual chrome windows and popups, as well as in content tabs.
     55 
     56 For example, here's what the frame selection popup lists when there are two browser windows open, one with one content tab, and one with two:
     57 
     58 .. image:: browser-toolbox-iframes.png
     59 
     60 
     61 Debugging popups
     62 ****************
     63 
     64 It's hard to debug popups, because the browser hides them as soon as you click outside them. There is a way to disable this behavior. Click the toolbox menu and select **Disable popup auto-hide**.
     65 
     66 .. image:: popup_auto-hide.png
     67  :class: center
     68 
     69 Now when you open any popup, it will stay open until you press the :kbd:`Esc` key. You can use the Inspector's node picker to select that panel, and examine and modify its content.
     70 
     71 You can use the same technique to debug `popups created by add-ons <https://extensionworkshop.com/documentation/develop/debugging/#debugging_popups>`_.
     72 
     73 .. note::
     74  This change is not persistent across browser restarts. When you close the browser toolbox, the setting will be cleared.