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.
img src=all_dbg_str__1.0.png alt="dbg_str() output formats"