2.3. Debugging RQL#
2.3.1. Available levels#
Server debugging flags. They may be combined using binary operators.
2.3.2. Enable verbose output#
To debug your RQL statements, it can be useful to enable a verbose output:
from cubicweb import server
server.set_debug(server.DBG_RQL|server.DBG_SQL|server.DBG_ALL)
Another example showing how to debug hooks at a specific code site:
from cubicweb.server import debugged, DBG_HOOKS
with debugged(DBG_HOOKS):
person.cw_set(works_for=company)
2.3.3. Detect largest RQL queries#
See Profiling and performance chapter (see Profiling and performance).