[IMP] settings: simplify the developer mode page

task-3849915

closes odoo/documentation#9236

X-original-commit: e16a66706a
Signed-off-by: Xavier Platteau (xpl) <xpl@odoo.com>
This commit is contained in:
XPL
2024-05-02 14:43:58 +00:00
parent 8aa9c48a97
commit 7cae4def1f
11 changed files with 53 additions and 87 deletions
+47 -81
View File
@@ -1,102 +1,68 @@
.. _developer-mode:
===========================
Developer Mode (debug mode)
Developer mode (debug mode)
===========================
The developer mode (or debug mode) unlocks access to extra and advanced tools in Odoo. There are
several ways to activate the developer mode: through the
:ref:`settings <general/developer_mode/settings>`, the
:ref:`browser extension <general/developer_mode/browser-extension>`, through
the :ref:`command palette <general/developer_mode/command-palette>` or the
:ref:`URL <general/developer_mode/url>`.
The developer mode, also known as debug mode, unlocks access to advanced :ref:`tools and settings
<developer-mode/tools>` in Odoo.
.. _general/developer_mode/settings:
Activate through the Settings
=============================
The debug mode can be activated in the Odoo database settings. Go to :menuselection:`Settings -->
General Settings --> Developer Tools` and click on :guilabel:`Activate the developer mode`. At
least one application needs to be installed for the :guilabel:`Developer Tools` section to appear
in the :guilabel:`Settings` module.
.. image:: developer_mode/settings.png
:align: center
:alt: Overview of the debug options under settings in Odoo.
.. warning::
Proceed with caution, as some developer tools and technical settings are considered advanced and
may have associated risks. Only use them if you understand the implications and are confident in
your actions.
.. note::
:guilabel:`Activate the developer mode (with assets)` is used by developers; :guilabel:`Activate
the developer mode (with tests assets)` is used by developers and testers.
The developer mode is also available with :ref:`assets <frontend/framework/assets_debug_mode>`,
which are used to debug JavaScript code, and with :ref:`tests assets
<frontend/framework/tests_debug_mode>`, which are used to run test tours.
.. _developer-mode/activation:
Activation
==========
To activate it, open the :guilabel:`Settings` app, scroll down to the :guilabel:`Developer Tools`
section, and click :guilabel:`Activate the developer mode`.
Once activated, the :guilabel:`Deactivate the developer mode` option becomes available.
.. _general/developer_mode/browser-extension:
.. image:: developer_mode/settings.png
:alt: Activating the developer mode in the Settings app
Activate through the browser extension
======================================
To activate the developer mode **from anywhere in the database**, add `?debug=1` to the URL after
`/web` (e.g., `https://example.odoo.com/web?debug=1#action=menu&cids=1`). To deactivate it, use
`?debug=0` instead.
Within a web browser, navigate to the browser settings and extensions and search for the `Odoo
Debug` extension. Once the extension is installed, a new icon will be shown on the browser's
toolbar.
For the *Odoo Debug* extension, a single click enables a normal version of the mode, while a
double click enables it with assets. To deactivate it, use a single click.
.. image:: developer_mode/developer-mode-monkey.png
:align: center
:alt: View of Odoo's debug icon in a Google Chrome toolbar.
.. _general/developer_mode/command-palette:
Activate through the command palette
====================================
In Odoo, the command palette tool has a command to activate the debug mode. First, open the command
palette tool with the keyboard shortcut `ctrl+k` and then type `debug`. A command will show up to
activate the debug mode.
.. image:: developer_mode/command-palette.png
:align: center
:alt: Command palette with debug command.
.. _general/developer_mode/url:
.. _developer-mode/url:
Activate through the URL
========================
The debug mode can also be activated by adding an extra query string to the database's URL. In the
URL, add `?debug=1` or `?debug=true` after `/web`. To deactivate the debug mode, change the
value to `?debug=0` instead.
.. image:: developer_mode/url.png
:align: center
:alt: Overview of a URL with the debug mode command added.
Use `?debug=assets` to activate the developer mode with assets and `?debug=tests` to activate it
with tests assets.
.. tip::
Additional modes are available for developers: `?debug=assets` enables the
:ref:`assets mode <frontend/framework/assets_debug_mode>`, and `?debug=tests` enables
the :ref:`tests mode <frontend/framework/tests_debug_mode>`.
Open the **command palette** by pressing `Ctrl + K` or `Cmd ⌘ + K`, then type `debug` to
activate the developer mode with assets or deactivate it.
.. _developer-mode/mode-tools:
.. admonition:: Browser extension
Locate the developer mode tools
===============================
The `Odoo Debug <https://github.com/Droggol/OdooDebug>`_ browser extension adds an icon to toggle
developer mode on or off from the browser's toolbar. It is available on the `Chrome Web Store
<https://chromewebstore.google.com/detail/odoo-debug/hmdmhilocobgohohpdpolmibjklfgkbi>`_ and
`Firefox Add-ons <https://addons.mozilla.org/firefox/addon/odoo-debug/>`_.
Once developer mode is activated, the developer mode tools can be accessed from the :guilabel:`Open
Developer Tools` button, the bug icon located in the header of the Odoo database.
.. _developer-mode/tools:
.. image:: developer_mode/button-location.png
:align: center
:alt: Overview of a console page and the debug icon being shown in Odoo.
Developer tools and technical menu
==================================
This menu contains additional tools that are useful to understand or edit technical data, such as
the views or actions of a page. On a page that has filters, actions, and view options, the
developer mode tools contain some useful menu items such as:
Once the developer mode is activated, the developer tools can be accessed by clicking the
:icon:`fa-bug` :guilabel:`(bug)` icon. The menu contains tools useful for understanding or editing
technical data, such as a view's field, filters, or actions. The options available depend on where
the menu is accessed from.
- :guilabel:`Edit Action`
- :guilabel:`Manage Filters`
- Edit the current view (e.g. Kanban, List, Graph, etc.)
- See the :guilabel:`Fields View Get`
.. image:: developer_mode/tools.png
:alt: Accessing the developer tools
Database administrators can access the technical menu from the :guilabel:`Settings` app. It contains
advanced database settings, such as ones related to the database structure, security, actions, etc.
.. image:: developer_mode/technical.png
:alt: Accessing the technical menu
Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB