Details
Description
If a component renders incorrect markup (say, omits a closing tag) this can be very difficult to debug because the page corruption is not immediately obvious. A debug feature in DOMResponseWriter would be useful for detecting and analyzing this.
One technique would be to make use of the fact that the component instance is passed in as an argument to most ResponseWriter calls:
writer.startElement(HTML.SPAN_ELEM, uiComponent);
It should be possible to use the component hierarchy together with the DOM hierarchy to detect problems.