The Vue Devtools 4.0 update introduces new features and improvements, including editable component data, quick edit, opening components in the editor, showing original component names, easier component inspection, filtering events by component, Vuex inspector filter, vertical layout, improved scroll-to-component, and collapsible inspectors.
Abstract
A significant update to the Vue Devtools has been released, introducing several new features and improvements. Users can now edit component data directly in the Component inspector pane, with support for various data types. The Quick Edit feature allows for single-click editing of certain value types. Components can be opened directly in the editor, and original component names can be displayed. Inspecting components has been made easier with right-click and programmatic options. Events can be filtered by component, and the Vuex inspector now has a filter input. The devtools switch to a vertical layout when not wide enough, and the scroll-to-component feature has been improved. Inspectors can now be collapsed, and there are additional improvements and bug fixes.
Bullet points
Editable component data: Users can modify component data directly in the Component inspector pane.
Quick Edit: Allows for single-click editing of certain value types, such as Booleans and Numbers.
Open component in editor: Components can be opened directly in the editor if using vue-loader or Nuxt.
Show original component names: Users can disable formatted component names and display the original names.
Easier component inspection: Components can be inspected by right-clicking or using the $inspect special method.
Filter events by component: Events can be filtered by the components that emitted them.
Vuex inspector filter: The Vuex inspector now has a filter input.
Vertical layout: The devtools switch to a vertical layout when not wide enough.
Improved scroll-to-component: The feature now centers the component on the screen.
Collapsible inspectors: Inspectors can now be collapsed, with keyboard modifier options for collapsing or expanding all sections.
Additional improvements and bug fixes: Including improved support for Date, RegExp, and Component types, and the use of v-tooltip for rich tooltips and popovers.
What’s new in Vue Devtools 4.0
A big update was released to the Vue devtools just a few days ago. Let’s dive into the new features and improvements! 🎄
Editable component data
You can now modify the data of your component directly in the Component inspector pane.
Select a component
Under the data section in the inspector, mouse over a field
Click on the pencil icon
Submit your changes by clicking on the done icon or by hitting Enter. You can hit Escape to cancel the edition
The content of the field is the serialized JSON value. For example, if you want to enter a string, type "hello" with the double-quotes. An array should look like [1, 2, "bar"] and an object like { "a": 1, "b": "foo" } .
Currently, the values of following types can be edited:
null and undefined
String
Literal: Boolean , Number , Infinity , -Infinity and NaN
Arrays
Plain objects
For the Arrays and Plain objects, you can add and remove items using the dedicated icons. You can also rename object keys.
A warning will be displayed if the input isn’t valid JSON. However, some values like undefined or NaN can be typed directly for more convenience.
More types will be supported in future releases!
Quick Edit
Some types of value can be edited in a single click with the ‘Quick Edit’ feature.
Booleans can be toggled directly with the checkbox icon:
Numbers can be incremented or decremented with the plus or minus icons:
You can use some keyboard modifiers to increment or decrement the value faster.
Open component in editor
If you are using vue-loader or Nuxt in your project, you can now open the selected component in your favorite code editor (provided it is a Single-File Component).
Follow this setup guide (if you are using Nuxt, you don’t need to do anything)
In the Component inspector, mouse over the component name — you should see a tooltip with the file path
Click on the component name and it will open in your editor
By default, all the component names are formatted into CamelCase. You can disable this by toggling the ‘Format component names’ button in the Components tab. This settings will be remembered and it will also be applied to the Events tab.
Inspecting components just got easier
While you have the Vue devtools open, you can right-click on a component to inspect it:
Right-click a component in the page
You can also programmatically inspect a component using the $inspect special method:
Either way, the components tree will be expanded to the newly selected component automatically.
When the devtools are not wide enough, they will now switch to an handy vertical layout. You can move the divider between the top and bottom panes just like in the default horizontal mode.
Improved scroll-to-component
By default, selecting a component will no longer scroll the view to it. Instead, you need to click the new ‘Scroll into view’ icon:
Click on the eye icon to scroll to the component
It will now center the component on the screen.
Collapsible inspectors
The sections of the different inspectors can now be collapsed. You can use keyboard modifier to collapse them all or expand them all in one click. This is very useful if you are, let’s say, only interested in the mutations details of the Vuex tab.
And more!
The ‘Inspect DOM’ button is now hidden if the environment doesn’t have this feature — by michalsnik
Date, RegExp, Component support is improved (and time-traveling should work with those types now)
The devtools are now using v-tooltip for rich tooltips and popovers (also fixing some issues)
If you already have the extension, it should update automatically to 4.0.1 . You can also install it on Chrome and on Firefox.
Thank you for all the contributors that helped make this big update possible!
If you find an issue or have a new feature to suggest, please share it!
What’s next?
A new release should arrive pretty soon with even more features like selecting a component in the page (color picker-style) and some UI improvements.
We also have a few things in the works, like a standalone Vue devtools app that will allow debugging any environment (not just Chrome and Firefox), a brand new Routing tab and an improved support for Set and Map types.