Lancer Odoo avec le niveau de trace debug :
./odoo-server/odoo-bin --log-level=debug -c /etc/odoo-server.conf
Utiliser pdb pour mettre des points d'arrêt, faire du pas à pas, visualiser les données. Ajouter la ligne de commande suivante dans le fichier .py :
import pdb; pdb.set_trace()
Commandes principales :
h (help) displays a summary of the pdb commands available
p (print) evaluates and prints an expression
pp (pretty print) is useful to print data structures such as dictionaries or lists
l (list) lists the code around the instruction to be executed next
n (next) steps over to the next instruction
s (step) steps into the current instruction
c (continue) continues execution normally
u (up) move up the execution stack
d (down) move down in the execution stack