A visual debugging plugin for Vue 3, ideal for real-time data development and debugging.
- Elegant and collapsible visualization of any object or array.
- Global
<Debug />component to display data anywhere in your app. useDebugcomposable to emit debug data from anywhere.- Easy event name configuration.
- 100% TypeScript and easy to integrate.
npm install @christianpasinrey/vue3-debug-dataimport { createApp } from 'vue';
import App from './App.vue';
import { DebugPlugin } from '@christianpasinrey/vue3-debug-data';
const app = createApp(App);
app.use(DebugPlugin); // You can pass options if you want
app.mount('#app');<template>
<Debug />
<!-- ...the rest of your app... -->
</template>import { useDebug } from '@christianpasinrey/vue3-debug-data';
// In any function, setup, or composable:
useDebug({ foo: 'bar', user: { name: 'Ana' } });You can change the debug event name:
app.use(DebugPlugin, { eventName: 'my-debug-event' });Global component to visualize emitted data.
Composable to emit debug data.
eventName(string): Custom event name to listen and emit data.
import { createApp } from 'vue';
import App from './App.vue';
import { DebugPlugin, useDebug } from '@christianpasinrey/vue3-debug-data';
const app = createApp(App);
app.use(DebugPlugin, { eventName: 'debug' });
app.mount('#app');
// Anywhere in your app:
useDebug({ foo: 'bar' });MIT