diff --git a/content/applications/general/developer_mode.rst b/content/applications/general/developer_mode.rst index a831f0660..d30c31168 100644 --- a/content/applications/general/developer_mode.rst +++ b/content/applications/general/developer_mode.rst @@ -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 `, the -:ref:`browser extension `, through -the :ref:`command palette ` or the -:ref:`URL `. +The developer mode, also known as debug mode, unlocks access to advanced :ref:`tools and settings +` 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 `, + which are used to debug JavaScript code, and with :ref:`tests assets + `, 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 `, and `?debug=tests` enables - the :ref:`tests 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 `_ 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 + `_ and + `Firefox Add-ons `_. -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 diff --git a/content/applications/general/developer_mode/button-location.png b/content/applications/general/developer_mode/button-location.png deleted file mode 100644 index 4c5bf85ce..000000000 Binary files a/content/applications/general/developer_mode/button-location.png and /dev/null differ diff --git a/content/applications/general/developer_mode/command-palette.png b/content/applications/general/developer_mode/command-palette.png deleted file mode 100644 index a7cc8721f..000000000 Binary files a/content/applications/general/developer_mode/command-palette.png and /dev/null differ diff --git a/content/applications/general/developer_mode/command_palette.png b/content/applications/general/developer_mode/command_palette.png deleted file mode 100644 index c2958bf41..000000000 Binary files a/content/applications/general/developer_mode/command_palette.png and /dev/null differ diff --git a/content/applications/general/developer_mode/developer-mode-monkey.png b/content/applications/general/developer_mode/developer-mode-monkey.png deleted file mode 100644 index 0be03a5b5..000000000 Binary files a/content/applications/general/developer_mode/developer-mode-monkey.png and /dev/null differ diff --git a/content/applications/general/developer_mode/settings.png b/content/applications/general/developer_mode/settings.png index c4eb6fc6e..5d43936c7 100644 Binary files a/content/applications/general/developer_mode/settings.png and b/content/applications/general/developer_mode/settings.png differ diff --git a/content/applications/general/developer_mode/technical.png b/content/applications/general/developer_mode/technical.png new file mode 100644 index 000000000..fa65c682e Binary files /dev/null and b/content/applications/general/developer_mode/technical.png differ diff --git a/content/applications/general/developer_mode/tools.png b/content/applications/general/developer_mode/tools.png new file mode 100644 index 000000000..b97fd8f83 Binary files /dev/null and b/content/applications/general/developer_mode/tools.png differ diff --git a/content/applications/general/developer_mode/url.png b/content/applications/general/developer_mode/url.png deleted file mode 100644 index 3abcc3c6b..000000000 Binary files a/content/applications/general/developer_mode/url.png and /dev/null differ diff --git a/content/developer/reference/backend/performance.rst b/content/developer/reference/backend/performance.rst index cd465aa6f..ad636f8be 100644 --- a/content/developer/reference/backend/performance.rst +++ b/content/developer/reference/backend/performance.rst @@ -40,7 +40,7 @@ including tests. #. Before starting a profiling session, the profiler must be enabled globally on the database. This can be done in two ways: - - Open the :ref:`developer mode tools `, then toggle the + - Open the :ref:`developer mode tools `, then toggle the :guilabel:`Enable profiling` button. A wizard suggests a set of expiry times for the profiling. Click on :guilabel:`ENABLE PROFILING` to enable the profiler globally. @@ -51,7 +51,7 @@ including tests. #. After the profiler is enabled on the database, users can enable it on their session. To do so, toggle the :guilabel:`Enable profiling` button in the :ref:`developer mode tools - ` again. By default, the recommended options :guilabel:`Record + ` again. By default, the recommended options :guilabel:`Record sql` and :guilabel:`Record traces` are enabled. To learn more about the different options, head over to :ref:`performance/profiling/collectors`. @@ -127,7 +127,7 @@ Analyse the results To browse the profiling results, make sure that the :ref:`profiler is enabled globally on the database `, then open the :ref:`developer mode tools -` and click on the button in the top-right corner of the profiling +` and click on the button in the top-right corner of the profiling section. A list view of the `ir.profile` records grouped by profiling session opens. .. image:: performance/profiling_web.png @@ -172,7 +172,7 @@ Whereas the profiler is about the *when* of profiling, the collectors take care Each collector specializes in collecting profiling data in its own format and manner. They can be individually enabled from the user interface through their dedicated toggle button in the -:ref:`developer mode tools `, or from Python code through their key or +:ref:`developer mode tools `, or from Python code through their key or class. There are currently four collectors available in Odoo: diff --git a/content/developer/tutorials/discover_js_framework/01_owl_components.rst b/content/developer/tutorials/discover_js_framework/01_owl_components.rst index 6cf7f6638..818527abe 100644 --- a/content/developer/tutorials/discover_js_framework/01_owl_components.rst +++ b/content/developer/tutorials/discover_js_framework/01_owl_components.rst @@ -97,8 +97,8 @@ As a first exercise, let us modify the `Playground` component located in .. tip:: The Odoo JavaScript files downloaded by the browser are minified. For debugging purpose, it's - easier when the files are not minified. Switch to - :ref:`debug mode with assets ` so that the files are not minified. + easier when the files are not minified. Switch to :ref:`debug mode with assets + ` so that the files are not minified. This exercise showcases an important feature of Owl: the `reactivity system <{OWL_PATH}/doc/reference/reactivity.md>`_. The `useState` function wraps a value in a proxy so Owl can keep track of which component