Debug panel

Tips submitted by PHPMaker users
Post Reply
sticcino
User
Posts: 1043

Debug panel

Post by sticcino »

2021
Display initially as collapsed

arbei
User
Posts: 9383

Post by arbei »

v2021.0.2 has added Config(""DEBUG_MESSAGE_TEMPLATE"), from the source, it is:

"DEBUG_MESSAGE_TEMPLATE" => '<div class="card card-danger ew-debug"><div class="card-header">' .
'<h3 class="card-title">%t</h3>' .
'<div class="card-tools"><button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fas fa-minus"></i></button></div>' .
'</div><div class="card-body">%s</div></div>'

You can now change the template as needed, e.g. in server side Global Code

$myDebugTemplate = '<div class="card card-danger ew-debug">......</div>' ;
Config(""DEBUG_MESSAGE_TEMPLATE", $myDebugTemplate);

Adam
User
Posts: 480

Post by Adam »

Good point, just add this one line in the Global > All Pages > Page_Loading event:

Config('DEBUG_MESSAGE_TEMPLATE', str_replace(array('ew-debug', 'minus'), array('ew-debug collapsed-card', 'plus'), Config('DEBUG_MESSAGE_TEMPLATE')));

sticcino
User
Posts: 1043

Post by sticcino »

works perfectly.

interestingly enough, unless I broke something with the prior code and its in my code somewhere ... added the 1 line CONFIG line above, now my pages displays the debug output... i was not able to see the debug data, just the processing time was appearing...

thanks


Post Reply