How to quickly find the vue instance in the window object

Viewed 138

enter image description here

This is a website developed using the vue front-end framework. I printed the window object on the console, trying to find an instance of vue, how to find it quickly?

I want to analyze the website developed by other people with vue, not the website developed with vue by myself~~~

1 Answers

You could access it with:

  • __VUE_DEVTOOLS_INSTANCE_MAP__ (no need for window)
  • by using the devtools for VueJS v2 (if using v3, it's here), selecting the root component and then accessing it in the console with $vm0
  • select an element in your Elements tab and then $0.__vue__, kudos to Markus Oberlehner's tweet

enter image description here

Also, Vue Telescope is a nice extension too (gives some cool details on the packages used) !

Related