vscode-debug-profiler

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

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

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 like source map resolution, inspector ports, and profiling workflows that frequently cause breakpoints to miss or profiles to be unreadable. ## Core Features & Use Cases - Launch Configuration Generation: Produces complete launch.json setups for Fastify servers, Next.js server and client debugging, Jest test debugging, and attach-to-process workflows. - CPU and Memory Profiling Workflows: Step-by-step guides for capturing flame charts and heap snapshots, with tables mapping common bottlenecks and leak patterns to fixes. - Source Map Troubleshooting: Concrete fixes for breakpoints not hitting, including tsconfig and sourceMapPathOverrides settings. - Use Case: A developer notices an endpoint is slow, uses the generated CPU profile config to capture a flame chart, identifies an N+1 Prisma query, and fixes it with a batched findMany call. ## 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 configuration with type node, request launch, and runtimeExecutable pnpm running your dev script, with sourceMaps enabled and skipFiles excluding node internals. For Next.js client-side debugging, add a chrome configuration pointing at localhost with sourceMapPathOverrides for webpack paths.

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 several hundred requests to the suspect endpoint, then take a second snapshot and compare objects allocated between them. Common culprits are EventEmitter listeners, unbounded caches, and closures retained by timers.

Why are my breakpoints not hitting in the VS Code debugger?

Breakpoints usually miss because of source map problems. Enable sourceMaps in launch.json, add resolveSourceMapLocations covering your workspace while excluding node_modules, and set sourceMap and inlineSources to true in tsconfig.json so the debugger maps back to TypeScript.

How do I profile CPU usage of a slow Node.js endpoint in VS Code?

Launch the app in debug mode, click Take Performance Profile in the debug toolbar, send requests to the slow endpoint, then stop the profile to open a flame chart. Look for wide bars with high self time, such as synchronous JSON parsing, blocking loops, or sequential await waterfalls.

Can I attach the VS Code debugger to an already running Node.js process?

Yes, start the process with node --inspect=0.0.0.0:9229 and use an attach configuration with request attach and port 9229. Enable restart and sourceMaps in the configuration so the debugger reconnects and maps to TypeScript sources.