Skip to content

Debug: add __DEV__ command/ctrl click #7

@joshjung

Description

@joshjung

I would like a feature where when DEV is true, pressing Command or Ctrl and then clicking on an element does the following:

  • Finds all ancestors of the clicked DOM Node (dom)
  • Finds all attached controllers of all the ancestors (controllers)
  • Finds all attached models of the controllers (models)
  • Finds all running threads of the controllers (threads)

It then builds an object that looks like this:

{
  dom: [...]
  controllers: [...]
  models: [...],
  activeThreads: [...]
}

It then outputs the object to the console.

In addition, it creates a simpler version of of the same object above that just contains important information about each (e.g. DOM node ids or classes or controller names) and then pretty-prints it into a string that is then copied to the clipboard.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions