code: public static void debugHtml(Writer writer, FacesContext faces) throws IOException
      {
          _init(faces);
          Date now = new Date();
          for (int i = 0; i < debugParts.length; i++)
          {
              if ("message".equals(debugParts[i]))
              {
                  writer.write(faces.getViewRoot().getViewId());
              }
              else if ("now".equals(debugParts[i]))
              {
                  writer.write(DateFormat.getDateTimeInstance().format(now));
              }
              else if ("tree".equals(debugParts[i]))
              {
                  _writeComponent(faces, writer, faces.getViewRoot(), null, true);
              }
              else if ("extendedtree".equals(debugParts[i]))
              {
                  _writeExtendedComponentTree(writer, faces);
              }
              else if ("vars".equals(debugParts[i]))
              {
                  _writeVariables(writer, faces, faces.getViewRoot());
              }
              else
              {
                  writer.write(debugParts[i]);
              }
          }
      }
docs: Generates the HTML debug page for the current view
  and writes it to the given writer.
  @param writer
  @param faces
  @throws IOException