Mimic Coldfusion's debug output in PHP?

Posted by TekiusFanatikus on Stack Overflow See other posts from Stack Overflow or by TekiusFanatikus
Published on 2011-11-24T17:46:30Z Indexed on 2011/11/24 17:50 UTC
Read the original article Hit count: 202

Filed under:
|

I'm trying to mimic Coldfusion's debug output in PHP. Here's an example of what it looks like (ie. Execution Time section):

CF Debug Output

I've turned to XDebug.

Ideally, the exception stack error output would be what I'd be looking for. However, it only shows up when an exception occurs.

I also tried something like (in our CMS-ish app) this (original question here):

$content.= "<?php xdebug_start_trace('e:/xdebug/trace');?>";
$content.= "<?php require('".$page['file_'.LG]."'); ?>";
$content.= "<?php xdebug_stop_trace();?>";
...
$content.= "<?php echo readfile('e:/xdebug/trace.xt');?>";

However, I get an insane, browser crashing HTML table dropped at the bottom of page. Not very efficient.

My php.ini config:

xdebug.trace_format = 2
xdebug.collect_vars = 1
xdebug.collect_params = 4
xdebug.dump_globals = 1
xdebug.dump.SERVER = 'REQUEST_URI'
xdebug.show_local_vars = 1
xdebug.show_mem_delta = 1

I'm just wondering if someone has already done something similar?

© Stack Overflow or respective owner

Related posts about php

Related posts about xdebug