[IMP] developer: rework section on debug mode
closes odoo/documentation#1290
X-original-commit: b48f0cbad8
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
This commit is contained in:
parent
772e0945a9
commit
992fbc6ece
@ -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 <javascript/debug_mode/assets>`, and `?debug=tests` enables
|
||||
the :ref:`tests mode <javascript/debug_mode/tests>`.
|
||||
|
||||
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
|
||||
|
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"/>
|
||||
|
||||
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
|
||||
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<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.
|
||||
|
||||
.. _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.
|
||||
|
Loading…
Reference in New Issue
Block a user