This page gives an overview on how to debug GRAMPS.
Short: in your code add data to the logger with: log.warning(), log.error(), log.info()...
Gramps with the --debug flag: python gramps.py --debug="name_of_the_logger"
This is useful when working in different parts, adding info output, and selecting on the
commandline with --debug the logger you want to see output with.
== Use profiling ==
GRAMPS has a convenience hook to allow you to do profiling. Profiling gives an overview how many times methods are called in a code fragment and how long each one took. It helps to find
An example usage:
gramps, everytime you save, the profiler kicks in and prints to command line a report with the time for each function.
So in short: replace the call to a function/method to calling profile with as first parameter the function/method, and other parameters the parameters of the function/method.