Debugging your client-side code
For debugging server-side code, this book contains a whole chapter, that is, Chapter 7, Debugging Modules. For the client-side part, you'll get a kick-start in this recipe.
Getting ready
This recipe doesn't really rely on specific code, but if you want to be able to reproduce exactly what's going on, grab the previous recipe's code.
How to do it...
What makes debugging client-side script difficult is that the web client relies heavily on jQuery's asynchronous events. Given that breakpoints halt execution, there is a high chance that a bug caused by timing issues will not occur when debugging. We'll discuss some strategies for this later:
- For the client-side debugging, you will need to activate debug mode with the assets. If you don't know how to activate debug mode with the assets, read the Activating the Odoo developer tools recipe from Chapter 1, Installing the Odoo Development Environment. ...