code: protected void writeDebugInfo(final WComponent component, final XmlStringBuilder xml) {
  		if (component != null && (component.isVisible() || component instanceof WInvisibleContainer)) {
  			xml.appendTagOpen("ui:debugInfo");
  			xml.appendAttribute("for", component.getId());
  			xml.appendAttribute("class", component.getClass().getName());
  			xml.appendOptionalAttribute("type", getType(component));
  			xml.appendClose();
  
  			xml.appendTagOpen("ui:debugDetail");
  			xml.appendAttribute("key", "defaultState");
  			xml.appendAttribute("value", component.isDefaultState());
  			xml.appendEnd();
  
  			xml.appendEndTag("ui:debugInfo");
  
  			if (component instanceof WRepeater) {
  				// special case for WRepeaters - we must paint the info for each row.
  				WRepeater repeater = (WRepeater) component;
  
  				List<UIContext> contexts = repeater.getRowContexts();
  
  				for (int i = 0; i < contexts.size(); i++) {
  					UIContextHolder.pushContext(contexts.get(i));
  
  					try {
  						writeDebugInfo(repeater.getRepeatedComponent(i), xml);
  					} finally {
  						UIContextHolder.popContext();
  					}
  				}
  			} else if (component instanceof WCardManager) {
  				writeDebugInfo(((WCardManager) component).getVisible(), xml);
  			} else if (component instanceof Container) {
  				final int size = ((Container) component).getChildCount();
  
  				for (int i = 0; i < size; i++) {
  					writeDebugInfo(((Container) component).getChildAt(i), xml);
  				}
  			}
  		}
  	}
docs: Writes debugging information for the given component.
  
  @param component the component to write debugging information for.
  @param xml the writer to send the debug output to.