Sometimes, application logs are not enough to figure out what is going wrong. Fortunately, we also have the Python debugger. This recipe shows us how to insert a breakpoint in a method and trace the execution by hand.
Using the Python debugger to trace method execution
Getting ready
We will reuse the export_stock_level() method that was shown in the Using the Odoo shell to interactively call methods recipe of this chapter. Ensure that you have a copy at hand.
How to do it...
To trace the execution of export_stock_level() with pdb, perform the following steps:
- Edit the...