Odoo 20 is built with a variety of tools that enable developers to analyze the application views, debug the code, and evaluate their modifications as well as the performance of the application.
Developer Mode is a feature in Odoo that allows developers to get additional technical details and debugging features in the Odoo interface. In addition to this, the command-line developer mode is available using –dev.
In this blog post, I will take you through the process of enabling Developer Mode in Odoo 20, --dev options, and setting up the ODOO_DEV environment variable.
1. What Is Developer Mode in Odoo 20?
The Developer Mode, or Debug Mode, is a special mode that gives some additional technical information and features to users in the Odoo interface.
Many technical options are hidden from users in the Odoo software. If you enable the Developer Mode, you will have access to more technical information about the fields, views, actions, etc. in Odoo applications.
Some of the main features that can be accessed in Developer Mode include:
- Technical information about fields.
- Current view inspection and manipulation.
- Metadata information about a record.
- Information about the technical aspect of the current view.
- Executing JavaScript tests.
- Profiler enabling.
- Access to additional technical options.
Developer Mode is especially useful for developing custom modules and troubleshooting problems in Odoo applications.
2. How to Activate Developer Mode in Odoo 20
Developer mode in Odoo 20 can be enabled in different ways. Some of the ways to enable developer mode include the Settings module or a URL.
Method 1: Activate Through Settings
The process that can be followed to enable developer mode is as follows:
- Log in to the Odoo 20 database.
- Go to the Settings application.
- Find the Developer Tools tab.
- Enable developer mode.

Odoo will engage the debugging process when developer mode is enabled.
Method 2: Activate Using the URL
Another simple way to activate Developer Mode is by using a debug parameter in the database connection URL.
All you need to do is append "?debug=1" to your URL.
http://localhost:8020/web?debug=1
Here’s how to enable Developer Mode without having to use the Settings app.
Method 3: Activate Developer Mode With Assets
The assets debugging mode provided by Odoo is beneficial when solving issues related to JavaScript and CSS.
http://localhost:8020/web?debug=assets
This way, the JS and CSS files will not be minified, and it will help with debugging in case there is a problem on the front end.
Method 4: Activate Developer Mode With Tests
Odoo also offers a distinctive testing mode that will be able to load the test assets needed for the performance of the browser tour tests.
Use:
http://localhost:8020/web?debug=tests
It can be thought about when developing any new JavaScript functions or processes in the web browser.
Developer Mode can be switched off by typing "?debug=0" in the URL bar or just exiting Developer Tools from the debugger.
3. Understanding the --dev Options in Odoo 20
Apart from being able to use Developer Mode in the browser, Odoo can also be used for server-side development by means of the --dev command-line option.
The --dev command-line option is followed by a comma-separated list of features. One can choose which features to enable as per their development needs.
Example:
./odoo-bin -c odoo.conf --dev=reload,qweb,xml
These are ways through which the Odoo server can be started and refreshed. The following are the various options for development.
The following are the various development options available.
3.1. access
Access aids the developer to debug the issue of accessing.
When there is an "AccessError" with the HTTP response code "403 Forbidden," Odoo not only logs the error but also the traceback of the raised error. It is very useful for developers to understand the cause of the error and the security policy.
Example:
./odoo-bin -c odoo.conf --dev=access
It is helpful when it comes to managing access permissions and permission-related issues in custom software.
3.2. qweb
QWeb is used for debugging the QWeb templates’ evaluations.
If this flag is set to True, Odoo will allow setting up breakpoints for QWeb template evaluations in case there is a t-debug="debugger" flag in the template node. To enable this functionality, use:
./odoo-bin -c odoo.conf --dev=qweb
This tool is very useful for handling issues related to QWeb reports, website templates, and other QWeb modules.
3.3. reload
The “reload” feature makes sure that the server gets automatically reloaded whenever there are any changes in the Python file.
However, in most cases, users have to manually restart the Odoo server whenever there are any changes in the Python file.
Example:
./odoo-bin -c odoo.conf --dev=reload
This will be useful in ensuring that the server is restarted in development.
It should, however, be noted that autoreload is not an alternative to the module upgrade. In cases where changes have been made in the definition of the model, database, XML data record, and other data in the module, the module needs to be upgraded.
Autoreload may also depend on the editor of the developer.
3.4. replica
In the replica solution, it is possible to create a simulation using the read-only replica database without setting up another replicated database server.
This replication simulation process is done using the primary database server set up as the primary database.
For instance:
./odoo-bin -c odoo.conf --dev=replica
This is quite helpful while doing functional testing where read-only transactions and a replica-aware database connection are required.
Another point to remember is that it is a mere simulation of the development process and not the database replication process.
3.5. xml
Access to QWeb templates is gained for Odoo using XML documents rather than from those contained in the database itself by using XML.
For example:
./odoo-bin -c odoo.conf --dev=xml
This tool helps when the developer intends to make modifications in QWeb templates and checks this by directly running from the source file.
Some important points to keep in mind are
- The modifications that are made in QWeb templates in the XML file will be recognized without updating the module each time a template is modified.
- If there is any modification in the template in the database, then this template will not be loaded from the XML file till the next module update.
- Translation of the template cannot be performed through this tool.
This tool is quite helpful while developing the QWeb template.
3.6. all
Odoo has an "all" facility that enables different facilities for development in one go.
The following four commands are similar to "--dev=all" in Odoo 20:
For example:
./odoo-bin -c odoo.conf --dev=all
Important to remember: Not all the above-mentioned cases might contain replica simulation. If there is a need for replica simulation also, then please let me know:
./odoo-bin -c odoo.conf --dev=all,replica
-- dev flags should only be used during development and not switched on randomly in production systems.
4. Using the ODOO_DEV Environment Variable
Furthermore, the Development mode in Odoo 20 can also be configured through the environment variable known as ODOO_DEV.
It provides an alternative configuration method for the features without requiring users to specify the --dev option for each launch of the Odoo server. For instance, when talking about Linux:
export ODOO_DEV=reload,qweb,xml,access
When you have chosen your variable, all that is left is to start your Odoo server normally:
./odoo-bin -c odoo.conf
Odoo fetches development feature details from the environment variable and takes the options into account.
The list of development features that could be accessed using the alias could be used:
export ODOO_DEV=all
To incorporate replica simulation:
export ODOO_DEV=all,replica
The environment variables work as a strength while configuring the development environment locally or through an automatic development environment.
This is because ODOO_DEV is an environment-based configuration variable that has come into use since the Odoo 19 version. In Odoo 20, the above-mentioned configuration variable can be used along with the command-line configuration variable.
5. Exploring the Developer Menu in Odoo 20
With Developer Mode being active, some debugging tools become accessible through the Developer Tools menu, which is normally marked with the bug logo in Odoo.
It should be noted that the available choices depend on the specific application screen being shown at the moment, the chosen view, and the user rights.
Below, there are some frequently used tools listed.
5.1. View Fields
The View Fields tool assists developers in identifying the fields that are present in the current view.
Details regarding the technical aspects of the fields can be obtained, which allows developers to learn the technical names of fields and also their usage in the user interface.
For instance, in the case of developing a Sales Order Form, the developer has to know the technical name of the field in order to change its behavior using custom modules.
The following are the scenarios in which the feature is useful:
- Finding names of fields.
- Field details in the current view.
- Fields included in inherited views.
- Custom view modifications.
5.2. Edit View
The "Edit View" functionality enables the developer to see and edit the current view.
Based on the screen currently visible, Odoo makes it possible for the developer to check the view structure.
For instance, during the development of a form view, the developer will get the opportunity to check the XML structure of the form view and see what all fields, buttons, groups, pages, etc. have been specified in the view.
It is helpful when:
- Checking the XML structure of a form view/list view.
- Understanding the structure of the view.
- Identifying the view to inherit from.
- Finding the solution to the view inheritance problem.
It is helpful in the development of inherited views for custom modules.
5.3. View Metadata
The Metadata View provides information about the metadata associated with the selected record.
It can include:
- Database Record ID
- External ID, if any
- Model Metadata
- Date created and creator
- Date modified and modifier
In the case of investigating a particular record, such as a product or customer record, the developer uses the Metadata View feature to retrieve the Database ID and External ID of the record.
6. Running Tests Through Developer Tools
Tests are very crucial in Odoo Development. The Odoo platform provides facilities to perform JavaScript tests in browsers and test tours.
6.1. JavaScript Tests
Test JavaScript with the Developer Tools menu, which includes the following testing utilities:
JavaScript test runner (if available).
Using these tools, it is possible for the developers to perform testing on front-end objects and detect bugs in the JavaScript components.
JavaScript testing is necessary during the development process:
- Custom OWL components.
- JavaScript widgets.
- Frontend features.
- Custom client actions.
- POS and other extensions of web clients.
6.2. Running Test Tours
Test tours can also be done with the Odoo application using browsers.
Test tours will allow the users to interact with the Odoo user interface to test a complete process using the browser.
Test assets can be tested by using the URL parameter mentioned below:
http://localhost:8020/web?debug=tests
The tests can be run from the JavaScript console of the browser:
odoo.startTour("tour_name");Replace tour_name with the name of the test tour.
This will assist you during the testing of user operations like record creation, clicking on buttons, navigation between views, and frontend validations.
Note: The web test frameworks should be kept separate from the Python module tests. Mostly, the Python tests are run using an Odoo CLI command.
7. Using the Profiler From Developer Tools
Performance problems in the Odoo process can arise as a consequence of the tendency of the process to make several SQL calls, perform complex computation, and excessively load pages.
There is an in-built profiler that Odoo provides that will assist in analyzing this problem.
The information that will be collected by the profiler can include:
- Queries executed via SQL.
- Python execution traces.
- Time taken in different parts of the application.
- Performance details.
How to Enable Profiling
For the purpose of enabling profiling, follow the steps below:
- Enable Developer Mode.
- Open the Developer Tools Menu.
- Select Enable Profiling.
- If profiling was not enabled before, Odoo will ask you to enable it.
- Select an expiration period and enable profiling.
- Again, open the Developer Tools menu and enable profiling for your session.
- Perform the activity that is under observation.
- Disable profiling after collecting all required data.

The suggested profiling settings by default include SQL query recording and execution tracing.
Understanding Profiling Results
The profiler helps the developers in determining the actions that take most of the time.
For instance, in the case of a customized report that takes a few seconds to be generated, the profiler will assist in analyzing the SQL queries and tracing the action.
A few of the items that the profiler can detect include the following:
- Duplicated SQL queries.
- Slow Python functions.
- Time-consuming actions.
- Processes that need optimization.
The use of the profiler has to be done on a certain process for a certain period since profiling consumes additional resources of the server.
8. When Should Developers Use Developer Mode and --dev Options?
While both activities promote developmental processes, they have different functions.
| Requirement | Recommended feature |
| Inspect technical field information | Developer Mode |
| Examine or modify the current view | Developer Mode |
| Check record metadata | Developer Mode |
| Debug JavaScript and CSS assets | ?debug=assets |
| Run browser-based test tours | ?debug=tests |
| Automatically reload after Python file changes | --dev=reload |
| Debug QWeb template evaluation | --dev=qweb |
| Read QWeb templates from XML files | --dev=xml |
| Investigate access-related tracebacks | --dev=access |
| Simulate read-only replica behaviour | --dev=replica |
| Investigate application performance | Developer Tools profiler |
It becomes easy for developers to implement because developers have the ability to test errors without incorporating debugging tools.
Developer mode and –dev options are necessary in Odoo 20 programming. In Developer mode, the developer gets access to technical data via the interface, while server-side development options allow managing Odoo’s behavior during development.
Access, qweb, reload, replica, and XML options may be applied in different debugging activities. The ODOO_DEV environment option also proves to be an efficient one, as it allows configuring all these options when launching the server.
Knowledge of these options will help the developer to debug views, deal with access issues, debug QWeb templates, check front-end code, and perform performance analysis.
To read more about Odoo 20 Roadmap Explained: Key Updates and Future Expectations, refer to our blog, Odoo 20 Roadmap Explained: Key Updates and Future Expectations.