← Back to Vue.js Course | Chapter 1: Introduction | Lesson 6 of 7

Vue DevTools

Vue DevTools is a browser extension that lets you inspect components, state and events while your app runs.

In this page:

  1. Vue DevTools

Vue DevTools

Install the Vue DevTools extension for Chrome, Firefox or Edge, or use the standalone app. It shows the component tree, lets you edit props and state live, tracks Pinia stores and Router state, and has a timeline of events.

It works with development builds of Vue.

Note: DevTools only connects to development builds by default.

Example: Vue DevTools

markup
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
</head>
<body>
<div id="app">
  <p>Open Vue DevTools to inspect this component.</p>
  <p>App name: {{ name }}</p>
</div>
<script>
  const app = Vue.createApp({
    name: "DevToolsDemo",
    data() { return { name: "Inspectable App" }; },
  });
  app.config.errorHandler = (err) => console.error(err);   // app-level error hook
  app.mount("#app");
  console.log("devtools flag is a boolean:", typeof app.config.devtools === "boolean" || app.config.devtools === undefined);
</script>
</body>
</html>

<!-- Output:
Rendered: Open Vue DevTools to inspect this component.App name: Inspectable App
console: devtools flag is a boolean: true
-->
Related Topics
Common Mistakes
  1. Using a production build and finding nothing
  2. Editing state in DevTools and expecting it to persist
  3. Forgetting to enable the extension for file URLs
Chapter Summary
  • DevTools inspects components and state
  • It shows Pinia and Router
  • It has a timeline
  • Works with development builds
🔒

Chapter Quiz — Complete all 7 topics to unlock

0/7 topics done

Complete these topics first:

Login to run this code

C/C++/Java/PHP execution requires a free account. Your code is saved — you'll land right back in the editor after logging in.