debug_backtrace:浏览器不响应/挂起

I'm trying to see how many times a file is included. Someone recommended me to replace the code of the file with this:

<pre>
<?php
    var_dump(debug_backtrace());

?>
</pre>
<hr />

but the browser just show the first page of the output and then doesn't respond so I can not scroll the view.

Any idea?

Regards

Javi

You could try setting header to text/plain.

header('Content-Type: text/plain');

This will help browser to render the page assuming that you are loading a lot of data.

Alternatively, you should/could use require_once and avoid the worry, assuming that you include file similar to bootstrap or helper functions pack.

Depending on how big the script is and how many recursion there is (if any) debug_backtrace() can be very long.

I had the same trouble, nothing seemed to fix it so I used the print version:

ob_start();
debug_print_backtrace();
$bt = ob_get_clean();

not elegant, but the hanging problem disappeared.