Friday 19 August 2011 12:52:33 am
By : Steven E. Bailey
So I'm trying to debug a site which has ajax calls to a module that serves xml. Of course the debug output appended to the xml breaks it. I've had this problem before but I never bothered looking closer at it until now.
So, I added this:
if (preg_grep('@Content-Type: text/xml.*@', headers_list() ) ) return null;
to index.php right after the:
if ( $ini->variable( 'DebugSettings', 'DebugOutput' ) != 'enabled' ) return null;
check in the eZDisplayDebug function. Works like a charm.
So, worth a git pull? Maybe it should be anything that's not "text/html" instead? Is there some eZ way of doing this that I overlooked?
Timing: | Jan 18 2025 00:07:46 |
Script start | |
Timing: | Jan 18 2025 00:07:46 |
Module start 'layout' | |
Timing: | Jan 18 2025 00:07:46 |
Module start 'content' | |
Timing: | Jan 18 2025 00:07:46 |
Module end 'content' | |
Timing: | Jan 18 2025 00:07:46 |
Script end |
Total runtime | 0.0841 sec |
Peak memory usage | 6,144.0000 KB |
Database Queries | 42 |
Checkpoint | Start (sec) | Duration (sec) | Memory at start (KB) | Memory used (KB) |
---|---|---|---|---|
Script start | 0.0000 | 0.0048 | 593.2656 | 152.6406 |
Module start 'layout' | 0.0049 | 0.0029 | 745.9063 | 39.4688 |
Module start 'content' | 0.0078 | 0.0751 | 785.3750 | 352.0234 |
Module end 'content' | 0.0828 | 0.0012 | 1,137.3984 | 15.7031 |
Script end | 0.0840 | 1,153.1016 |
Accumulator | Duration (sec) | Duration (%) | Count | Average (sec) |
---|---|---|---|---|
Ini load | ||||
Load cache | 0.0028 | 3.3757 | 15 | 0.0002 |
Check MTime | 0.0011 | 1.3660 | 15 | 0.0001 |
Mysql Total | ||||
Database connection | 0.0009 | 1.0169 | 1 | 0.0009 |
Mysqli_queries | 0.0457 | 54.3106 | 42 | 0.0011 |
Looping result | 0.0002 | 0.2955 | 40 | 0.0000 |
Template Total | 0.0494 | 58.7 | 2 | 0.0247 |
Template load | 0.0019 | 2.2312 | 2 | 0.0009 |
Template processing | 0.0475 | 56.4681 | 2 | 0.0237 |
Template load and register function | 0.0001 | 0.1452 | 1 | 0.0001 |
states | ||||
state_id_array | 0.0008 | 0.9800 | 1 | 0.0008 |
state_identifier_array | 0.0006 | 0.7719 | 2 | 0.0003 |
Override | ||||
Cache load | 0.0015 | 1.8084 | 12 | 0.0001 |
Sytem overhead | ||||
Fetch class attribute name | 0.0017 | 1.9921 | 3 | 0.0006 |
class_abstraction | ||||
Instantiating content class attribute | 0.0000 | 0.0099 | 3 | 0.0000 |
General | ||||
dbfile | 0.0006 | 0.7631 | 10 | 0.0001 |
String conversion | 0.0000 | 0.0085 | 4 | 0.0000 |
Note: percentages do not add up to 100% because some accumulators overlap |
Usage | Requested template | Template | Template loaded | Edit | Override |
---|---|---|---|---|---|
1 | node/view/full.tpl | blog_entry/full.tpl | extension/community_design/design/suncana/override/templates/blog_entry/full.tpl | ||
2 | content/datatype/view/ezxmltext.tpl | <No override> | extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tpl | ||
4 | content/datatype/view/ezxmltags/paragraph.tpl | <No override> | extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tpl | ||
2 | content/datatype/view/ezxmltags/literal.tpl | <No override> | extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tpl | ||
1 | content/datatype/view/ezkeyword.tpl | <No override> | extension/community_design/design/suncana/templates/content/datatype/view/ezkeyword.tpl | ||
1 | print_pagelayout.tpl | <No override> | extension/community/design/community/templates/print_pagelayout.tpl | ||
Number of times templates used: 11 Number of unique templates used: 6 |
Time used to render debug report: 0.0001 secs