vscode-debug-profiler

Configures VS Code debugging and CPU and memory profiling for Node.js and Next.js applications.

1|Updated May 4, 2026
One-click install
npx skills add https://github.com/Scardubu/SwarmXQ --skill vscode-debug-profiler-scardubu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vscode-debug-profiler
Source: https://github.com/Scardubu/SwarmXQ/tree/main/.ai/skills/vscode-debug-profiler
Command: npx skills add https://github.com/Scardubu/SwarmXQ --skill vscode-debug-profiler-scardubu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up VS Code debugging for Node.js, Fastify, and Next.js projects involves non-obvious configuration details — source map resolution, inspector flags, attach ports, and profiling workflows — that frequently cause breakpoints to miss or profiles to be unreadable. This Skill provides complete, working launch.json configurations and step-by-step profiling workflows so you can diagnose slow endpoints, memory leaks, and test failures without trial and error. ## Core Features & Use Cases - Ready-to-use launch.json configurations: Attach mode, Fastify launch, CPU profiling, heap snapshots, Next.js server and client debugging, and Jest test debugging. - CPU profiling workflow: Step-by-step flame chart capture and interpretation, with a table of common bottlenecks (async waterfalls, blocking JSON, N+1 queries) and their fixes. - Memory leak detection: Heap snapshot comparison workflow with common leak patterns (EventEmitter listeners, unbounded caches, timer closures) and fixes. - Source map troubleshooting: Concrete launch.json and tsconfig.json settings to fix breakpoints not hitting in TypeScript projects. - Use Case: Your Fastify endpoint is slow in development. Use this Skill to generate the CPU profile launch config, capture a flame chart while sending test requests, identify an async waterfall in the hot path, and fix it with parallelized awaits. ## Quick Start Ask the assistant to set up VS Code debugging and CPU profiling for your Fastify or Next.js project and generate the launch.json configuration.

Frequently Asked Questions about vscode-debug-profiler

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up launch.json for debugging a Fastify or Next.js app in VS Code?

Create a launch.json with a node launch configuration using pnpm run dev as the runtime, sourceMaps enabled, and skipFiles excluding node internals and node_modules. For Next.js client-side debugging, add a chrome configuration pointing at localhost:3000 with webpack sourceMapPathOverrides.

How do I find a memory leak in a Node.js application?

Launch the app with --expose-gc, take a baseline heap snapshot from the VS Code memory tab, send 100-500 requests to the suspect endpoint, then take a second snapshot and compare objects allocated between them. Look for growing EventEmitter listeners, unbounded Maps, and closures retained by setInterval.

Why are my breakpoints not hitting in VS Code with TypeScript?

Breakpoints miss when source maps are misconfigured. Set sourceMaps to true and add resolveSourceMapLocations covering your workspace in launch.json, and enable sourceMap plus inlineSources in tsconfig.json so the debugger maps compiled JavaScript back to TypeScript source.

How do I attach the VS Code debugger to a running Node.js process?

Start the process with node --inspect=0.0.0.0:9229, then use an attach configuration with request set to attach and port 9229. Enable restart and sourceMaps in the configuration so the debugger reconnects automatically and maps to your source files.

What does a CPU flame chart show for a slow Node.js endpoint?

A flame chart shows function call stacks where wide bars indicate time-consuming functions. Check self time versus total time to isolate the actual bottleneck, and look for blocking JSON.parse calls, synchronous fs operations, and sequential await chains that indicate async waterfalls.