diff --git a/content/applications/general/developer_mode.rst b/content/applications/general/developer_mode.rst index c24699411..9d6b34634 100644 --- a/content/applications/general/developer_mode.rst +++ b/content/applications/general/developer_mode.rst @@ -33,23 +33,45 @@ Activate through a browser extension :align: center :alt: View of odoo’s debug icon in a chrome’s toolbar +Activate through the command palette +==================================== + +The command palette tool has a command to activate the debug mode: open it with +the keyboard shortcut `ctrl+k`, 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 + Activate through the URL ======================== -In the URL add ``?debug=1`` or ``?debug=true`` after *web*. +In the URL, add ``?debug=1`` or ``?debug=true`` after *web*. To deactivate the +debug mode, add `?debug=0` instead. .. image:: url.png :align: center :alt: Overview of an url with the debug mode command added in Odoo .. tip:: - Developers: type ``?debug=assets`` and activate the mode with assets. + Additional modes are available for developers: `?debug=assets` enables the + :ref:`assets mode `, and `?debug=tests` enables + the :ref:`tests mode `. Locate the mode tools ===================== -The Developer mode tools can be accessed from the *Open Developer Tools* button, located on the -header of your pages. +The Developer mode tools can be accessed from the *Open Developer Tools* button, +located on the header of your pages. This menu contains additional tools that +are useful to understand or edit technical data, such as the views or the actions. +It contains some useful menu items such as: + +- edit action +- manage filters +- edit the current view +- see the `fields view get` +- and much more. .. image:: button_location.png :align: center diff --git a/content/applications/general/developer_mode/command_palette.png b/content/applications/general/developer_mode/command_palette.png new file mode 100644 index 000000000..c2958bf41 Binary files /dev/null and b/content/applications/general/developer_mode/command_palette.png differ diff --git a/content/developer/reference/frontend/framework_overview.rst b/content/developer/reference/frontend/framework_overview.rst index cc100d3f9..926922813 100644 --- a/content/developer/reference/frontend/framework_overview.rst +++ b/content/developer/reference/frontend/framework_overview.rst @@ -596,34 +596,11 @@ The `debug` mode current value can be read in the :ref:`environment -Toggling debug mode -------------------- +.. seealso:: + - :ref:`Activate the debug mode ` -The most common way to activate the debug mode is to edit the url: just add -`?debug=1` or `?debug=assets` before the `#` sign, then reload the page. This -will cause the server to mark the session as being in debug mode. -To deactivate the debug mode, one can then simply add `?debug=0` to explicitely -notify the server that we no longer want it. - -An alternative way to toggle the debug mode is to use the command palette. First -step is to open it (ctrl+k), then type `debug`: a command will show up to -activate the debug mode. - -Debug menu ----------- - -Once the debug mode is activated, an additional sub menu, called the `debug menu`, -is available in the systray (in the top bar), or in the title bar of some -dialogs. This menu contains additional tools that are useful to understand -or edit technical data, such as the views or the actions. It contains -some useful menu items such as: - -- edit action -- manage filters -- edit the current view -- see the `fields view get` -- and much more. +.. _javascript/debug_mode/assets: Assets mode ----------- @@ -632,10 +609,12 @@ The `debug=assets` sub mode is useful to debug javascript code: once activated, the :ref:`assets` bundles are no longer minified, and source-maps are generated as well. This makes it useful to debug all kind of javascript code. +.. _javascript/debug_mode/tests: + Tests mode ---------- -There is a specific sub mode named `tests`: if enabled, the server injects the +There is another sub mode named `tests`: if enabled, the server injects the bundle `web.assets_tests` in the page. This bundle contains mostly test tours (tours whose purpose is to test a feature, not to show something interesting to users). The `tests` mode is then useful to be able to run these tours.