Module

debug

Debug and introspection utilities for Bengal.

Provides tools for understanding how pages are built, including template resolution, dependency tracking, cache status, and performance analysis.

Key Components:

  • PageExplainer: Generate explanations for how pages are built
  • ExplanationReporter: Format and display explanations in terminal
  • IncrementalBuildDebugger: Debug incremental build issues
  • BuildDeltaAnalyzer: Compare builds and explain changes
  • DependencyVisualizer: Visualize build dependencies
  • ContentMigrator: Safe content restructuring with link tracking
  • ShortcodeSandbox: Test directives/shortcodes in isolation
  • ConfigInspector: Advanced config comparison with origin tracking

Debug Tool Infrastructure:

  • DebugTool: Base class for debug tools
  • DebugReport: Structured output from debug tools
  • DebugRegistry: Tool discovery and registration

Related Modules:

  • bengal.cli.commands.explain: CLI command for page explanation
  • bengal.cli.commands.debug: CLI commands for debug tools
  • bengal.core.page: Page model being explained
  • bengal.rendering.template_engine: Template resolution
  • bengal.cache.build_cache: Cache status introspection

See Also:

  • plan/active/rfc-explain-page.md: Design RFC for this feature

Functions

__getattr__
Lazy import for optional components.
1 Any
def __getattr__(name: str) -> Any

Lazy import for optional components.

Parameters 1

Name Type Default Description
name str

Returns

Any