if ( viewId!=null && viewId.startsWith("/debug.") && Init.instance().isDebug() )
{
try
{
URL url = SeamDebugPhaseListener.class.getClassLoader().getResource("META-INF/debug.xhtml");
Facelet f = new DefaultFaceletFactory( new SAXCompiler(), new DefaultResourceResolver() ).getFacelet(url);
UIViewRoot root = facesContext.getViewRoot();
f.apply(facesContext, root);
HttpServletResponse response = (HttpServletResponse) facesContext.getExternalContext().getResponse();
response.setContentType("text/html");
ResponseWriter writer = facesContext.getRenderKit().createResponseWriter( response.getWriter(), "text/html", "UTF-8" );