Skip to content

Debugging: Leave a breadcrub when something is bound #503

@g105b

Description

@g105b

On really complex projects, it can become daunting to know exactly where an element's value is bound from - there may be many nested pages with dynamic paths, full of custom components. Where does one particular span get its textContent from?

When in debug mode, the Binder classes could leave a debug attribute on the element once it has been bound, indicating exactly where the binding was done from. e.g. <span data-bound-from="page/_component/my-thing.php:29">This is bound!</span>.

Whether we're in debug mode can be passed into the constructor, loaded from the config.ini.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNon-breaking improvements to existing behaviour

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions