Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How do I start odoo server (8.0RC1) in debug mode (to use pdb)

By
Fabián De Luca
on 8/21/14, 3:01 PM 4,932 views

Hi everyone,

I'd like to know how to start odoo server (8.0RC1, as title says) on debug mode in order to use python's pdb.

I have tried a few things and none of them do the trick.

Any help would be appreciated.

Please use a question instead of 'Odoo 8.0RC1' as your title - this tells readers nothing about your problem and forces them to open it to find out. You will increase the chances that someone actually reads your question if you construct your title as a question - like I have changed it to "How do I ..."

Bista Solutions US, Ray Carnes
on 8/21/14, 4:36 PM
0
eLBati
On 8/22/14, 6:32 AM

Debug mode

According to odoo.py --help

--debug             enable debug mode

so start odoo with

odoo.py --debug

 

PDB

You have to edit the python file you want to debug by adding a breakpoint with

import pdb

pdb.set_trace()

and start odoo normally.

Thank you for commenting. What I'm trying to figure out is how to start the server on debug mode: i already know how to use a pdb (been using it on previous versions). What I can't seem to achieve is to start odoo server on debug mode.

Elepe Servicios, Fabián De Luca
on 8/22/14, 10:14 AM
0

import pdb

whitch line in to breackpoint (debug mode start) you want, before Add this line  pdb.set_trace()

  • In terminal side 

"S"  for Next step

Execute the current line, stop at the first possible occasion (either in a function that is called or on the next line in the current function).

"N" for next line

Continue execution until the next line in the current function is reached or it returns. (The difference between next and step is that step stops inside a called function, while next executes called functions at (nearly) full speed, only stopping at the next line in the current function.)

Thank you for commenting. What I'm trying to figure out is how to start the server on debug mode: i already know how to use a pdb (been using it on previous versions). What I can't seem to achieve is to start odoo server on debug mode.

Elepe Servicios, Fabián De Luca
on 8/22/14, 10:14 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 8/21/14, 3:01 PM
Seen: 4932 times
Last updated: 3/16/15, 8:10 AM