Forums / Developer / How to change HTML of ez debug output ?

How to change HTML of ez debug output ?

Author Message

Armen Zourabian

Monday 20 September 2004 5:32:50 am

Hi all!

When used in development setup (DebugSettings in ini file), ezPublish will output all the debug stuff at the end of the template. However it uses TABLE element with no id attribute, so the styling of this debug is difficult to impossible (html + table dont work as selector for some reason). I want to change the HTML code output of the debug. I found ezdebug.php in /lib/ezutils which outputs the debugging, however I am reluctant to changing ezPublish own code. Any other alternatives ?

Frederik Holljen

Monday 20 September 2004 6:28:37 am

Sorry, but the debug html is hardcoded into eZ publish itself since we really didn't expect that anyone ever wanted to style that :)
I suggest that you either:
- edit ezdebug.php directly and replace it when you upgrade. ezdebug.php isn't changed that frequently anyway.
or
- Patch ezdebug.php in some way that allows people to style the output. Send the patch to us and hope that we apply it (no promises though).

Armen Zourabian

Monday 20 September 2004 6:38:05 am

I could just do that (overlay the API in ezdebug.php, to write custom markup) :D
In that case, I will send the documentation and APIs..

Thanks for the reply, I already changed the ezdebug.php. Right now, all I did, was to add id=\"ezDebug\" to the root debug TABLE element. I ll take it from there.

There are several reasons to style the debug.

1. Different markup validates differently for different DOCTYPE declarations, hence a hardcoded TABLE may fail to validate, especially in XHTML documents with different default namespace (not 1999 XHTML)

2. Different authors see TABLEs differently and are not willing to use it for debugging output. I myself use a more elegant CSS driven design for debugging.

3. Debug styling is not important, but in my case where a lot of absolute positioned elements are used for my layout, ez debug actually pops up right beneath them, making it difficuly to debug my own layout (visually). So, I tried to move the ezDebug to the right top corner of the page, and unless I use a selector, CSS cant find it, so id=ezDebug helped.