Skip to content

Run and debug Odoo ​

Start your Odoo server with one click, read its log as it starts, and attach the debugger when you need to stop at a breakpoint.

What you can do ​

  • Run Odoo with one click from the title bar or with F5.
  • Read the server log in the Debug Console, which opens when you run.
  • Debug with breakpoints when you turn on Run with Debugger.
  • Restart or stop the server from the title bar.
  • Open Odoo in the built-in browser each time you run.

Get started ​

  1. Set up your Odoo environment, including the debugger paths. If no configuration exists yet, Run opens the debugger setup for you.
  2. Select Run in the title bar, or press F5. Odoo starts and the Debug Console shows its log.
  3. To stop the server, select Stop. To start it again, select Restart (Ctrl+Shift+F5, or Cmd+Shift+F5 on macOS). Restart stops the server, waits for it to end, then runs it again with a fresh console.

The title-bar Restart and Stop buttons appear only while Odoo is running.

Stop Odoo safely ​

The first Stop asks Odoo to shut down cleanly (the same as pressing Ctrl+C), and the log shows "Initiating shutdown". This lets Odoo finish what it is doing. If Odoo does not exit, select Stop a second time to end it immediately.

Run with or without the debugger ​

By default, Run and F5 start Odoo without the debugger attached. The server starts faster and is not paused by a leftover breakpoint. Breakpoints are not hit in this mode.

To debug with breakpoints:

  • Open the arrow next to Run in the title bar and select Run with Debugger. Run and F5 then start Odoo with the debugger attached. Select it again to switch back.
  • Or select Run > Start Debugging from the menu bar for a single debug session.

The arrow next to Run has these options:

OptionWhat it does
Open in BrowserOpens Odoo in the built-in browser each time you run
Open Browser in New WindowOpens that browser tab in its own window. Needs Open in Browser
Run with DebuggerMakes Run and F5 attach the debugger

The Debug button in the title bar opens the Configure Odoo Debugger section, where you can change the Python, odoo-bin and configuration paths.

Use breakpoints ​

With the debugger on:

  1. Select the space to the left of a line number to set a breakpoint, or right-click the line and select Toggle Breakpoint.
  2. Send a request that reaches that code. Odoo pauses on the line.
  3. Use the debug toolbar to continue, step over (F10), step into (F11), step out (Shift+F11) or stop (Shift+F5).
  4. Type Python expressions in the Debug Console to inspect variables while the server is paused.

The debugger stops only in your own code. It skips the virtual environment and the Python standard library, so stepping stays on your modules.

The Breakpoints view in Run and Debug lists every breakpoint, where you can turn them off or remove them.

Open Odoo in the built-in browser ​

Open the arrow next to Run and select Open in Browser. Odoo then opens in a browser tab next to your code each time you run it. Select Open Browser in New Window to put that tab in its own window.

  • This is off by default.
  • Assista opens the port set in your odoo.conf (http_port, or xmlrpc_port on older versions). If neither is set, it uses 8069.
  • You can open the page before Odoo finishes starting. Assista retries until the server answers.
  • It reuses one browser tab for your project and reloads it when you restart Odoo.

Tips and limits ​

  • If Odoo does not start, check the paths in Configure Odoo Debugger and use Test Configuration.
  • Your odoo.conf needs db_host, db_user and db_password. Test Configuration checks for these.
  • Assista keeps a debug entry named Odoo Debug in .vscode/launch.json. It keeps your other entries, and it updates older entries of type python to the current debugger automatically.
  • Only the first folder in your workspace is used. See Set up your Odoo environment.
  • Linux Snap upgrade: if you move from an older Snap build, Assista may offer to move your Odoo data (the filestore) to the standard location. Choose Move It Now, or Don't Ask Again. The command Recover Odoo Data from Previous Location runs it later.

Troubleshooting ​

What you seeWhat to do
Run opens the debugger setup instead of starting OdooNo launch configuration exists. Fill in and save Configure Odoo Debugger
Breakpoints are never hitTurn on Run with Debugger, or use Run > Start Debugging
Odoo does not stop on the first StopWait for the shutdown log. Select Stop again to end it immediately
The browser tab shows a connection errorOdoo is still starting. The tab retries. Check the Debug Console for startup errors
"Could not update launch.json"The file has a syntax error. Fix it or remove it, then save again
Odoo cannot connect to PostgreSQLCheck the database settings. See Prerequisites

Next steps ​

Built by Cybrosys Technologies.