Debugging your client-side code
This book contains a whole chapter for debugging server-side code, Chapter 7, Debugging Modules. For the client-side part, you’ll get a kick-start in this recipe.
Getting ready
This recipe doesn’t 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 scripts difficult is that the web client relies heavily on jQuery’s asynchronous events. Given that breakpoints halt the 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 in Chapter 1, Installing the Odoo Development Environment. ...