Dev ToolbarBuilt-in AppsInspector

Inspector

Click any element on the page to jump directly to its JSX source in your editor.

Last updated:

The Inspector app lets you click any element on the rendered page and immediately open the corresponding JSX source file in your editor at the exact line and column.

How it works

  1. Open the toolbar and activate the Inspector app (the cursor icon).
  2. Hover over any element — a label shows the component name and source location (file:line:col).
  3. Click the element — a popup appears with:
    • Open in editor — jumps to the JSX source in your configured editor
    • Copy HTML — copies the element's outer HTML to the clipboard
    • Copy path — copies the file:line:col source path

JSX source injection

The Inspector relies on data-vdt-source attributes that are injected into every JSX opening element at build time by the inject-source Vite plugin (part of @visulima/dev-toolbar/vite).

Source injection is enabled by default in development mode and is skipped entirely in production builds.

Configure it via the injectSource plugin option:

devToolbar({
    injectSource: {
        enabled: true,
        ignore: {
            files: ["**/generated/**"],
            components: ["StrictMode"],
        },
    },
});

Source injection reads the original file from disk before transforming, so both SSR and client builds produce identical data-vdt-source values. This prevents React hydration mismatches in SSR frameworks.

Configuring the editor

By default, launch-editor auto-detects the running editor (WebStorm, VS Code, etc.) from the OS process list.

Per-user override (Settings app): open the Settings app and choose your editor from the "Preferred editor" dropdown. The selection is saved to localStorage and takes priority over the plugin-level default.

Project-level default: set the editor plugin option in your Vite config — this seeds the initial value for all users who haven't made a personal selection:

devToolbar({
    editor: "webstorm",
});

Enabling the Inspector

The Inspector is disabled by default. Enable it in your Vite config:

devToolbar({
    apps: {
        inspector: true,
    },
});
Support

Contribute to our work and keep us going

Community is the heart of open source. The success of our packages wouldn't be possible without the incredible contributions of users, testers, and developers who collaborate with us every day.Want to get involved? Here are some tips on how you can make a meaningful impact on our open source projects.

Ready to help us out?

Be sure to check out the package's contribution guidelines first. They'll walk you through the process on how to properly submit an issue or pull request to our repositories.

Submit a pull request

Found something to improve? Fork the repo, make your changes, and open a PR. We review every contribution and provide feedback to help you get merged.

Good first issues

Simple issues suited for people new to open source development, and often a good place to start working on a package.
View good first issues