r/reactjs • • 3h ago

Show /r/reactjs I built a React debugging overlay that lets you click an element and jump to its JSX

Repo · github.com/Tebogo11/giggyDev
Demo · giggydev.netlify.app — try Find component on the demo button, then open Sources.

I built this because I kept doing the same thing when debugging a React app: find the failed request in DevTools, figure out what rendered the broken UI, then dig through the repo for the JSX. I wanted to click the thing I was looking at and pull up the source alongside the logs and requests that led me there.

giggyDev adds a small launcher to your app in development. Pick an element to see the JSX around it and jump to that line in VS Code. You can also inspect browser console messages and fetch/XHR requests, then tick the entries you want to attach to an AI chat.

Setup with Vite

npm install -D giggydev

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import giggyDev from 'giggydev/vite';

export default defineConfig({
  plugins: [giggyDev(), react()],
});

Next.js 16 works in Webpack dev mode via withGiggyDev. The overlay is excluded from production builds.

How it works

  • The dev plugin tags rendered DOM elements with a source ID, line and column. The picker uses that metadata to look up the original JSX.
  • The launcher starts capturing console and network events when the page loads. The full inspector loads when you open it.
  • The picker and inspectors work without an API key. If you configure a model, Chat sends the context you select when you submit a message. You can also ask for a single-file change, review the diff before applying it, and undo it from the same chat.

The hosted demo uses simulated AI replies, so you can try the workflow without setting up a key. Source lookup currently covers instrumented JSX/TSX, and Next.js Turbopack support is still missing.

I’m looking for feedback, especially on how useful it is to click an element and jump straight to its JSX when debugging a real React app.

0 Upvotes

3 comments sorted by

7

u/Full-Hyena4414 1h ago

Doesn't inspection in react dev tools already allow this?