Skip to content

Add optional Lit debug mode configuration option #685

@agjohnson

Description

@agjohnson

Mostly just archiving this for later, I found this helpful in pinpointing what exactly was happening with Lit internals while working with FUI code that was conflicting:

window.emitLitDebugLogEvents = true;
window.addEventListener("lit-debug", (event) => {
  console.debug("Lit event:", event.detail);
});

In my case, when one of my LitElement properties was being updated, Lit was throwing an exception because the element changed outside control of Lit. I had to use debug output to figure out which property that was, and after that it was very easy to understand the conflict.

Be warned that this is a firehose of information though. I didn't want to add this under the existing debug flag because of how noisy it is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ImprovementMinor improvement to code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions