[IMP] developer: rework section on debug mode
closes odoo/documentation#1280 Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
This commit is contained in:
parent
da4dae597e
commit
b48f0cbad8
@ -33,23 +33,45 @@ Activate through a browser extension
|
|||||||
:align: center
|
:align: center
|
||||||
:alt: View of odoo’s debug icon in a chrome’s toolbar
|
: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
|
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
|
.. image:: url.png
|
||||||
:align: center
|
:align: center
|
||||||
:alt: Overview of an url with the debug mode command added in Odoo
|
:alt: Overview of an url with the debug mode command added in Odoo
|
||||||
|
|
||||||
.. tip::
|
.. tip::
|
||||||
Developers: type ``?debug=assets`` and activate the mode with assets.
|
Additional modes are available for developers: `?debug=assets` enables the
|
||||||
|
:ref:`assets mode <javascript/debug_mode/assets>`, and `?debug=tests` enables
|
||||||
|
the :ref:`tests mode <javascript/debug_mode/tests>`.
|
||||||
|
|
||||||
Locate the mode tools
|
Locate the mode tools
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
The Developer mode tools can be accessed from the *Open Developer Tools* button, located on the
|
The Developer mode tools can be accessed from the *Open Developer Tools* button,
|
||||||
header of your pages.
|
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
|
.. image:: button_location.png
|
||||||
:align: center
|
:align: center
|
||||||
|
BIN
content/applications/general/developer_mode/command_palette.png
Normal file
BIN
content/applications/general/developer_mode/command_palette.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
@ -596,34 +596,11 @@ The `debug` mode current value can be read in the :ref:`environment<javascript/e
|
|||||||
|
|
||||||
<field name="fname" groups="base.group_no_one"/>
|
<field name="fname" groups="base.group_no_one"/>
|
||||||
|
|
||||||
Toggling debug mode
|
.. seealso::
|
||||||
-------------------
|
- :ref:`Activate the debug mode <developer-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
|
.. _javascript/debug_mode/assets:
|
||||||
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.
|
|
||||||
|
|
||||||
Assets mode
|
Assets mode
|
||||||
-----------
|
-----------
|
||||||
@ -632,10 +609,12 @@ The `debug=assets` sub mode is useful to debug javascript code: once activated,
|
|||||||
the :ref:`assets<reference/assets>` bundles are no longer minified, and source-maps
|
the :ref:`assets<reference/assets>` bundles are no longer minified, and source-maps
|
||||||
are generated as well. This makes it useful to debug all kind of javascript code.
|
are generated as well. This makes it useful to debug all kind of javascript code.
|
||||||
|
|
||||||
|
.. _javascript/debug_mode/tests:
|
||||||
|
|
||||||
Tests mode
|
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
|
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
|
(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.
|
users). The `tests` mode is then useful to be able to run these tours.
|
||||||
|
Loading…
Reference in New Issue
Block a user