December 2018
Beginner to intermediate
404 pages
10h 14m
English
Let's see what a simple debugging session looks like. We can start by adding a debugger breakpoint in the first line of the button_send wizard method, shown as follows:
def button_send(self):
import pdb; pdb.set_trace()
self.ensure_one()
# ...
Now, restart the server, open a Send Message wizard form and click on the Send button. This will trigger the button_send method on the server, and the web client will stay in a Loading… state, waiting for the server's response. Looking at the Terminal window where the server is running, you will see something similar to the following:
> /mnt/c/Users/daniel/Documents/library-app/library_checkout/wizard/checkout_mass_message.py(27)button_send()-> self.ensure_one()(Pdb)
Read now
Unlock full access