npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@amrshbib/react-debugger

v1.0.2

Published

React and React Native standalone debugger SDK

Readme

License: MIT React React Native NPM Version NPM Downloads (Monthly) NPM Downloads (Weekly) NPM Downloads (Total) VS Code Marketplace

A lightweight, zero-config SDK that connects your React or React Native application directly to the React Debugger VS Code extension.

Stop relying on messy console logs and disjointed tools. Get real-time network inspection, console logs, state management debugging, performance monitoring, UI inspection, and more—all from the comfort of your editor!


✨ Why React Debugger?

  • Zero Boilerplate: One line of code to initialize.
  • Production Safe: Automatically disabled when __DEV__ === false. Zero performance impact in release builds.
  • Works Everywhere: Built for React Web, React Native (iOS/Android), and Expo.
  • All-in-One: Network, State, Logs, Storage, Performance—all in a single beautifully integrated VS Code tab.

🚀 Features

  • 🌐 Network Interceptor: Automatically captures all fetch, XMLHttpRequest, WebSocket and SignalR traffic with headers, payloads, and execution timing.
  • 📝 Console Interceptor: Captures console.log, warn, error, debug with full stack traces.
  • 🗃️ State Management: Redux support out of the box. Track actions, take state snapshots, and view beautiful state diffs.
  • 🧩 Context Debugger: Track and inspect state for React Context Providers dynamically.
  • Performance Monitor: Real-time FPS, memory usage, and thread metrics.
  • 🔍 UI Inspector: Captures your React component tree via the fiber tree.
  • 💾 Storage Inspector: View, manage, and clear AsyncStorage / localStorage entries remotely.
  • 🔗 Deep Linking: Trigger deep links directly from VS Code.
  • 🧭 Navigation Tracker: Reports route changes and params from React Navigation or custom routers.
  • 🌗 Dark/Light Mode: Gorgeous UI that adapts to your system theme preferences.

📦 Installation

npm install @amrshbib/react-debugger
# or
yarn add @amrshbib/react-debugger

Note: This package is designed to work alongside the React Debugger VS Code extension, which provides the real-time UI for inspecting your app. Install the extension from the VS Code Marketplace.

Peer Dependencies

  • react (required)
  • react-native (optional — only needed for React Native apps)
  • @react-native-async-storage/async-storage (optional — only needed for Storage Inspector on React Native)

⚡ Quick Start

1️⃣ Initialize the Debugger

Add initDebugger() at the very top of your app entry point (e.g. index.js, App.tsx). This must be called before any console.log, fetch, or state changes so the SDK can intercept them.

// index.js or App.tsx
import { initDebugger } from "@amrshbib/react-debugger";

initDebugger();

That's it! Once called, the SDK automatically connects to the debugger server via WebSocket (localhost:8347), intercepts traffic, and sends it to the VS Code extension in real time.

2️⃣ Set Up Redux Middleware (Optional)

If your app uses Redux, add debuggerMiddleware to your store to enable state debugging with action tracking, state snapshots, and beautiful tree diffs.

import { configureStore } from "@reduxjs/toolkit";
import { debuggerMiddleware } from "@amrshbib/react-debugger";
import rootReducer from "./reducers";

const store = configureStore({
  reducer: rootReducer,
  middleware: (getDefaultMiddleware) =>
    getDefaultMiddleware().concat(debuggerMiddleware),
});

export default store;

Legacy Redux (createStore):

import { createStore, applyMiddleware } from "redux";
import { debuggerMiddleware } from "@amrshbib/react-debugger";
import rootReducer from "./reducers";

const store = createStore(rootReducer, applyMiddleware(debuggerMiddleware));

3️⃣ Set Up Navigation Tracking (Optional)

Track route changes in the debugger to see navigation history, route names, and params in real time.

React Navigation (recommended):

import { useRef } from "react";
import { NavigationContainer } from "@react-navigation/native";
import { reportNavigationEvent } from "@amrshbib/react-debugger";

const App = () => {
  const navigationRef = useRef(null);

  const onStateChange = (state) => {
    const currentRoute = navigationRef.current?.getCurrentRoute();
    if (currentRoute) {
      reportNavigationEvent(currentRoute.name, currentRoute.params);
    }
  };

  return (
    <NavigationContainer ref={navigationRef} onStateChange={onStateChange}>
      {/* Your screens */}
    </NavigationContainer>
  );
};

📖 API Reference

initDebugger(options?)

Initializes the debugger SDK and connects to the debug server. Only runs in development mode.

Example:

import { initDebugger } from "@amrshbib/react-debugger";

initDebugger({
  trackContexts: ["LocalizationProvider", "GlobalNotificationsProvider"]
});

debuggerMiddleware

Redux middleware that captures dispatched actions, state snapshots, and computes state diffs.

reportNavigationEvent(routeName, params)

Manually reports a navigation event for custom routers or analytics wrappers.


🏗️ What Gets Captured Automatically?

Once initDebugger() is called, the SDK automatically intercepts:

| Domain | What's Captured | How | |--------|----------------|-----| | 🌐 Network | All fetch and XMLHttpRequest calls | Global monkey-patching | | 📝 Console | console.log, warn, error, debug | Console interception | | ⚡ Performance | FPS and memory limits | requestAnimationFrame | | 🔍 UI Inspector | React component tree | React DevTools fiber hook | | 💾 Storage | AsyncStorage / localStorage entries | On-demand capture & clearing | | 📱 System | Deep Linking & App Reload | Native Linking & DevSettings |

No additional code is needed beyond initDebugger() for these features!


🔧 Troubleshooting

  • SDK Not Connecting: Make sure the VS Code extension is active and port 8347 is not blocked. For physical devices on Android, ensure your device is on the same network or use adb reverse tcp:8347 tcp:8347.
  • Logs Not Appearing: Ensure initDebugger() is called before any other logs or network requests.
  • State Not Tracked: Verify debuggerMiddleware is correctly applied to your Redux store.

📄 License

This project is licensed under the MIT License.