typescript-debugging

Diagnose TypeScript runtime errors using sourcemaps and Node.js debugging tools.

1|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/caraya/agent-skills --skill typescript-debugging-caraya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-debugging
Source: https://github.com/caraya/agent-skills/tree/main/skills/typescript-debugging
Command: npx skills add https://github.com/caraya/agent-skills --skill typescript-debugging-caraya

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Debugging TypeScript code is challenging when stack traces point to generated JavaScript and type errors occur only at runtime. This skill enables accurate sourcemap usage, type-safe debugging, and effective inspection with Node.js DevTools and the VS Code Debugger.

Core Features & Use Cases

  • Sourcemap-enabled debugging to align runtime errors with TS source files.
  • Type-safe debugging with inline type information and guard checks.
  • Async stack trace inspection and memory leak diagnosis across Node.js apps.

Quick Start

Attach the Node.js debugger and step through TypeScript with sourcemaps to diagnose runtime errors.

Frequently Asked Questions about typescript-debugging

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

FAQPage Schema
How do I debug TypeScript runtime errors when stack traces point to generated JavaScript?

Debug TypeScript runtime errors by enabling sourcemaps in tsconfig to align stack traces with original TypeScript source files. This allows the Node.js inspector and VS Code debugger to map executed JavaScript back to TypeScript for accurate diagnosis.

What is the best way to inspect asynchronous stack traces in a Node.js TypeScript application?

Inspect asynchronous stack traces by attaching the Node.js debugger with sourcemaps enabled in your tsconfig. This integration provides precise runtime insights into async code execution and type mismatches directly within VS Code.

Do I need sourcemaps enabled to debug TypeScript in VS Code?

Yes, you need sourcemaps enabled in tsconfig to debug TypeScript in VS Code. SourceMap generation aligns runtime errors with TS source files, allowing type-safe debugging and effective inspection of Node.js applications.

How do I diagnose memory leaks in a Node.js TypeScript project?

Diagnose memory leaks in Node.js TypeScript projects by attaching the Node.js debugger and utilizing DevTools integration with sourcemaps. This enables accurate memory snapshot analysis mapped back to original TypeScript source code.

Why does my TypeScript code throw type-mismatch errors at runtime and how can I catch them?

Type-mismatch errors occur at runtime when generated JavaScript lacks type checks. Catch them by using type-safe debugging with inline type information and guard checks via the Node.js inspector and VS Code debugger integration.