Menu

Debugging

Nicolas Hainaux
Attachments
dbg_all.png (20743 bytes)
There is a newer version of this page. You can find it here.

All debugging features are implemented in the script maintenance/debug.py

Turn ENABLED to True in debug.py will let mathmaker write debugging informations to stderr.
You will have also to choose which method(s) will display this information. Just set the matching boolean in debug.py to True.

You can add other debugging points just using the debug.write() method. Try to put not too much of them everywhere...

Example of usage in base_calculus.Product.get_factors_list() :

debug.write("\n[get_factors_list] current Product is : " + self.dbg_str() + "\n",
            case=debug.get_factors_list_product)

Will write the message only if debug.get_factors_list_product is set to True.

The dbg_str() method is provided to all objects that we want to display debugging information. To help the understanding of imbricated objects, each object has specific debugging identifiers.

dbg_str() output formats


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.