List Registered Vue Components

Hi there,
I am trying to debug some code and I want to be able to list vue components but I don’t have Vue Dev tools available since I am using custom chrome build.

Can I get the components list out of the Vue Instance of the app or the global Vue instance?

you can access this.$options.components in any component.

it returns an object, keys are the component names, values are the contructors.

1 Like

Thank you for the reply. As far as I can see that is the registered components in custom component.
What about the global Vue Instance? There aren’t $options property there.

1 Like

Yes there is.

also, this.$options.components will contain any gloablly registered components (Vue.component()) as well, no matter in which component you call it.

Edit: or at least it should … will investigate

Edit2: got it. Vue.options.components gives you the global ones.


Thank you for your help with this one :slight_smile:

Using Vue version 2.5.16, I try this and get nothing listed. In a child I get the parent as shown, but none of the components I’ve declared via Vue.component('component-name', { .. }) - and, I could really use this (for globally registered components).

You can get all global components through Vue.options.components, but that’s not a really public API

Vue.options.components returns an empty object for me

Works fine here: