- Home
- /
- Foundation
- /
- DMBPageBuilder
- /
- Debug & Diagnostics
Debug & Diagnostics
Inspect rendering behavior, understand output, and diagnose composition issues.
Overview
Rendering systems often fail in subtle ways. A missing class, a misplaced closing tag, a duplicated render, or a missing dependency can break a page without producing an obvious exception. PageBuilder includes diagnostic mechanisms to make these issues easier to identify and understand.
The goal of diagnostics in PageBuilder is not to replace the rendering model. It is to make the rendering model observable when you need to inspect what happened during page generation.
Why diagnostics matter
As soon as a rendering system becomes layered, debugging output becomes harder. A page may involve:
When several of these mechanisms participate in the same page, it becomes important to know which builder rendered what, how many times it rendered, and whether the final output matches the intended structure.
Diagnostic goals
PageBuilder diagnostics help answer questions such as:
Builder-level diagnostics
At the builder level, PageBuilder can expose metadata that helps identify the origin of rendered output. In debug scenarios, a builder can annotate its output with diagnostic attributes that make the rendering process easier to inspect directly in the browser.
Typical information includes:
Why render counters help
A common category of rendering bug is duplicate rendering. A component may render more than once because of an unexpected lifecycle path, an incorrect helper usage pattern, or a composition bug.
Render counter signal
If a fragment that should render once is shown with a higher render count, the issue becomes much easier to localize. This kind of signal is often more useful than a generic stack trace because it explains what happened in the final HTML output.
Diagnostics and the rendering pipeline
Diagnostics are especially useful in the PageBuilder pipeline because the final document is assembled in multiple stages. The body may be captured first, components may register dependencies during rendering, and the final document may be emitted only afterward.
In this model, debugging output is not only about visible HTML. It is also about understanding:
Diagnostics and PageInformation
Some rendering issues are not caused by the markup itself, but by missing page-level dependencies. A component may render correctly but fail functionally because its script or stylesheet was not registered into PageInformation .
When diagnosing such issues, you often need to inspect not only the final HTML, but also whether the correct page-level state was accumulated during rendering. Typical questions include:
Typical categories of issues
Recommended diagnostic workflow
When a rendering problem appears, a good debugging approach is usually:
Diagnostics are for understanding, not for business logic
Diagnostic metadata should help explain output. It should not become part of normal application behavior. Rendering diagnostics exist to support development, framework evolution, and component debugging. They should remain a development aid rather than a dependency of the application itself.