You can use the function WMessage::log(); to put some trace or debug some variable in the code.
Syntax: WMessage::log( $variable, 'filename' );
$variable: mix can be any type of variable
'filename': will be the log file name you can then see the log file either in the backend of the site jApps -> Tools -> Logs or with FTP : /joobi/user/logs/filename.log
You can also use the function debug to display the value of a variable at the bottom of the page.
debug( $id, $variable );
$id: usually an int to define an id but could be any type of variable
$variable: any type of variable which you want to display on the screen
Log a Query
for any Joobi query identified with an query instance WModel::get( '...' )
you can use the ->log() function , the query will be saved into the logs into a file called queries.log