Debugging in OpenERP

This article covers the debugging technics available in OpenERP.

For debugging we need to run OpenERP server with parameter –debug.

After starting server with debugging mode and when any uncaught exception occures, then the server will move to debugginh mode.

From here we can do debugging and find what exactly is the issue. We can also set break point by using  pdb.set_trace() on certain part of code.

 

From debugger, we can check the issue or find the values of variable on run time. I am listing some usefull options available for debugging,

1: Print codes

To list the lines in which the debugger reach we can use l. This will display 5 lines above and below the line where debugger reach. l is the first letter in list.

Here we can also give line number to print the code from that line. Then pressing enter will display the succeeding lines.

To see the values in variables, we can make use of print statement. This is a very usefull feature to find whether the variables are having the value we intended.

If you wish to move the function this function called, then we can ,make use of u and d options. ‘u’ will move to the up and ‘d’ will move to down function.

Hope this will help you to find and fix bugs easily.

Comments

Priyanka: thanks please tell me how to print another's values also. ex : self,uid,cr...".

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Dubey .S says:

    Nice writing and good information.
    keep up the team spirit also.
    will get in touch with you for any other help.

    1. usha says:

      Does this work in windows environment also ?

      1. cerita lucu says:

        posts and the information you provide is very good indeed, I'm so easy to understand the content of this post I am also very happy with this website contains lots of useful information

  2. Priyanka says:

    thanks
    please tell me how to print another’s values also.
    ex : self,uid,cr…

© 2020 Zesty Beanz Pvt Ltd All Rights Reserved.