Setup
1. Create instrumentation.ts
export async function register() {
if (process.env.NEXT_RSC_DEBUG === "1") {
const { register } = await import("next-rsc-debug/server");
await register();
}
}2. Enable debugging
NEXT_RSC_DEBUG=13. Add the events endpoint
// app/api/debug-events/route.ts
export { GET } from "next-rsc-debug/route";4. Mount the dashboard
// app/rsc-debug/page.tsx
import { DevTools } from "@next-rsc-debug/devtools";
export default function DebugPage() {
return <DevTools url="/api/debug-events" />;
}The DevTools package is a Client Component library, so import it directly. Do not wrap it in next/dynamic with ssr: { false } inside a Server Component on Next.js 16.
5. Visit the dashboard
Open /rsc-debug in your app. Folders prefixed with an underscore are private in the App Router and are not routable, so avoid naming the folder __next-rsc-debug — it will return 404.