r/reactjs • • 4d 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

5 comments sorted by

10

u/Full-Hyena4414 3d ago

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

1

u/BossTriumph 3d ago

Yeah, React DevTools already lets you inspect components. I built giggyDev to bring the component source, console logs and network requests into one place. If you want AI help, you can pick the bits that are relevant to the bug and send them with your question.

It’s useful without AI too. If a network request fails or a console error pops up, you get a badge right on the launcher while you’re using the app. The Network tab also gives you a compact view of what your app sent. Here’s an example of what a request entry looks like.

{
  "method": "POST",
  "url": "http://127.0.0.1:5173/demo/profile.json",
  "status": 200,
  "duration": "14 ms",
  "contentType": "application/json",
  "requestPayload": {
    "format": "json",
    "data": {
      "name": "Alex",
      "preferences": {
        "theme": "light"
      },
      "token": "[REDACTED]"
    }
  },
  "responsePayload": {
    "format": "json",
    "data": {
      "id": 1,
      "name": "Alex",
      "role": "Developer",
      "message": "Hello from the giggyDev playground"
    }
  }
}

1

u/Jazzlike-Web-3695 3d ago

this is super useful. does it work with server components in next app router or only client components? and how does it map the element back to the file, babel plugin or source maps.